Connecting to database specified by database.yml  (0.4ms) BEGIN  (0.4ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (1.1ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (5.1ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:03 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 74) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 74) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 74], ["updated_at", Thu, 09 Oct 2014 05:41:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.3ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:03 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 81], ["to_date", Sun, 09 Nov 2014], ["updated_at", Thu, 09 Oct 2014 05:41:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/81/adhesions" for 127.0.0.1 at 2014-10-09 07:41:03 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"81"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "81"]]  (0.8ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 81 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 81  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 67 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 67 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 40.9ms (Views: 30.6ms | ActiveRecord: 6.6ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:03 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 75) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 75) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 75], ["updated_at", Thu, 09 Oct 2014 05:41:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"   (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:03 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 82], ["to_date", Sun, 09 Nov 2014], ["updated_at", Thu, 09 Oct 2014 05:41:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/82/adhesions" for 127.0.0.1 at 2014-10-09 07:41:03 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"82"} Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "82"]]  (0.5ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 82 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 82  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 68 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 68 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 13.3ms (Views: 7.1ms | ActiveRecord: 3.7ms) Started GET "/adherent/members/82/payments/new" for 127.0.0.1 at 2014-10-09 07:41:03 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"82"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "82"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 75 LIMIT 1 Adherent::Adhesion Load (2.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 82 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 68 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (22.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 57.5ms (Views: 30.1ms | ActiveRecord: 7.4ms) SQL (0.3ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:03 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 76) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 76) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 76], ["updated_at", Thu, 09 Oct 2014 05:41:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"   (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:03 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 83], ["to_date", Sun, 09 Nov 2014], ["updated_at", Thu, 09 Oct 2014 05:41:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/83/adhesions" for 127.0.0.1 at 2014-10-09 07:41:03 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"83"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "83"]]  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 83 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 83  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 69 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 69 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13.4ms (Views: 8.0ms | ActiveRecord: 2.8ms) Started GET "/adherent/members/83/adhesions/69/edit" for 127.0.0.1 at 2014-10-09 07:41:03 +0200 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"83", "id"=>"69"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "83"]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 83 AND "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "69"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (58.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 69.3ms (Views: 63.3ms | ActiveRecord: 2.2ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (1.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 77) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 77) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 77], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members/84/adhesions/new" for 127.0.0.1 at 2014-10-09 07:41:04 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"84"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "84"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 84 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 84 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (6.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.1ms (Views: 10.6ms | ActiveRecord: 2.5ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 84 Started POST "/adherent/members/84/adhesions" for 127.0.0.1 at 2014-10-09 07:41:04 +0200 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"84"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "84"]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 84], ["to_date", Thu, 31 Jul 2014], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/84/adhesions Completed 302 Found in 9.9ms (ActiveRecord: 2.7ms) Started GET "/adherent/members/84/adhesions" for 127.0.0.1 at 2014-10-09 07:41:04 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"84"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "84"]]  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 84 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 84  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 70 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 70 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13.4ms (Views: 8.1ms | ActiveRecord: 3.0ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 84 SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (1.9ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 78) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 78) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 78], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members/85/adhesions/new" for 127.0.0.1 at 2014-10-09 07:41:04 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"85"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "85"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 85 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 85 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (5.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.5ms (Views: 8.8ms | ActiveRecord: 2.7ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ffed30 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.6ms (Views: 2.1ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x605cc50 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x607cffa @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x608317a @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.5ms (Views: 1.6ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x609c51c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.1ms (Views: 1.0ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"09/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x60bf6b6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x60bf6b6%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5.5ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"09/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x60e4196 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x60e4196%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5.8ms (ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"09/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x610b138 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.3ms (Views: 1.7ms | ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" INNER JOIN "adherent_members" ON "adherent_payments"."member_id" = "adherent_members"."id" WHERE "adherent_members"."organism_id" = 86 Completed 200 OK in 16.1ms (Views: 2.2ms | ActiveRecord: 2.8ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x6184aa6 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6184ace%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5.9ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x64215a2 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (1.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8.4ms (Views: 2.3ms | ActiveRecord: 2.9ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x62d26b0 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.2ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8.2ms (Views: 2.2ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 91 Completed 200 OK in 7.7ms (Views: 1.0ms | ActiveRecord: 2.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 92) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 92], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/86/coord/new Completed 302 Found in 11.2ms (ActiveRecord: 3.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 93], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/87/coord/new Completed 302 Found in 10.5ms (ActiveRecord: 3.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8.4ms (Views: 1.6ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 95], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/88/coord/new Completed 302 Found in 11.0ms (ActiveRecord: 4.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5e88cda @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5.6ms (ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5f78f64 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6.0ms (ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"89"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/89 Completed 302 Found in 6.8ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"90"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/90 Completed 302 Found in 5.5ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"91"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 91 AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.6ms) UPDATE "adherent_members" SET "name" = 'Dalton', "updated_at" = '2014-10-09 05:41:04.528854' WHERE "adherent_members"."id" = 91  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/91 Completed 302 Found in 11.9ms (ActiveRecord: 3.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"92"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.9ms (Views: 1.6ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.5ms (Views: 1.6ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.8ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.5ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.2ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.2ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (1.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 107) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 107) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 107], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 107) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 107) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 107], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 107) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 107) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 107], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 93 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 93 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 93], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 93 Started GET "/adherent/members/93/payments/new" for 127.0.0.1 at 2014-10-09 07:41:04 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"93"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 107 LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 93 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 71 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 19.7ms (Views: 9.8ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/93/payments" for 127.0.0.1 at 2014-10-09 07:41:04 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/10/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"93"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 93 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 107 LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 93], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 93 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 71 SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 71], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["payment_id", 29], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/93/payments Completed 302 Found in 39.9ms (ActiveRecord: 7.7ms) Started GET "/adherent/members/93/payments" for 127.0.0.1 at 2014-10-09 07:41:04 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"93"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 93 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 29 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 71 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 93 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 29  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 29 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 29 CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 29 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 93 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (19.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35.4ms (Views: 27.6ms | ActiveRecord: 5.7ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 93  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 108) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 108) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 108], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 108) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 108) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 108], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 108) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 108) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 108], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 96 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 96 ORDER BY to_date DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 96], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/96/payments/new" for 127.0.0.1 at 2014-10-09 07:41:04 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"96"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "96"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 108 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 96 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 72 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.2ms (Views: 9.4ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/96/payments" for 127.0.0.1 at 2014-10-09 07:41:04 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/10/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"96"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "96"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 96 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 108 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 96], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 96 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 72 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 72], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["payment_id", 30], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/96/payments Completed 302 Found in 18.3ms (ActiveRecord: 5.7ms) Started GET "/adherent/members/96/payments" for 127.0.0.1 at 2014-10-09 07:41:04 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"96"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "96"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 96 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 30 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 72 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 96 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 30  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 30 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 30 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 30 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 96 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (52.3ms) Completed 200 OK in 73.4ms (Views: 66.7ms | ActiveRecord: 5.0ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_reglements"   (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 109) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 109) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 109], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 109) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 109) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 109], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 109) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 109) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 109], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 99 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 99 ORDER BY to_date DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 99], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/99/payments/new" for 127.0.0.1 at 2014-10-09 07:41:04 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"99"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "99"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 109 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 99 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 73 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.9ms (Views: 9.7ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/99/payments" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/10/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"99"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "99"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 99 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 109 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 99], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 99 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 73 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 73], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["payment_id", 31], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/99/payments Completed 302 Found in 18.9ms (ActiveRecord: 6.6ms) Started GET "/adherent/members/99/payments" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"99"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "99"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 99 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 31 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 73 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 99 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 31  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 31 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 31 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 31 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 99 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.7ms (Views: 14.0ms | ActiveRecord: 4.9ms)  (0.6ms) SHOW max_identifier_length  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 99 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (2.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 110) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 110) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 110], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 110) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 110) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 110], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 110) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 110) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 110], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 102 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 102 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 102], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/102/payments/new" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"102"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "102"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 110 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 102 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 74 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.6ms (Views: 9.9ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/102/payments" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"102"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "102"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 102 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 110 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 102], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 102 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 74 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 74], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["payment_id", 32], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/102/payments Completed 302 Found in 18.0ms (ActiveRecord: 6.2ms) Started GET "/adherent/members/102/payments" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"102"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "102"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 102 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 32 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 74 LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 102 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 32  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 32 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 32 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 32 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 102 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.8ms (Views: 13.8ms | ActiveRecord: 6.1ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 102 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 103 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 103 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 103], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 104 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 104 ORDER BY to_date DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 104], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/32/reglements/new" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"32"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "32"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 102 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 32  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 32 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 32 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 32 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 104 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 76 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 103 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 75 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (17.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32.9ms (Views: 21.0ms | ActiveRecord: 7.1ms) Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 102 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 102 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 32  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 32  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 111) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 111) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 111], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 111) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 111) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 111], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 111) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 111) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 111], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 105 Adherent::Adhesion Load (1.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 105 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 105], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/105/payments/new" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"105"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "105"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 111 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 105 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 77 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.6ms (Views: 9.4ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/105/payments" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"105"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "105"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 105 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 111 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 105], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 105 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 77 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 77], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["payment_id", 33], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/105/payments Completed 302 Found in 16.9ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/105/payments" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"105"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "105"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 105 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 33 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 77 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 105 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 33  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 33 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 33 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 33 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 105 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22.1ms (Views: 15.2ms | ActiveRecord: 5.1ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 105 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 106 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 106 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 106], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 107 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 107 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 107], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/33/reglements/new" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"33"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "33"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 105 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 33  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 33 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 33 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 33 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 107 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 79 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 106 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 78 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (12.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24.7ms (Views: 13.8ms | ActiveRecord: 6.3ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 112) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 112) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 112], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 112) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 112) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 112], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 112) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 112) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 112], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 108 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 108 ORDER BY to_date DESC LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 108], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/108/payments/new" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"108"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 112 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 108 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 80 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.9ms (Views: 8.9ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/108/payments" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"108"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 108 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 112 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 108], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 108 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 80 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 80], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["payment_id", 34], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/108/payments Completed 302 Found in 18.2ms (ActiveRecord: 6.3ms) Started GET "/adherent/members/108/payments" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"108"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 108 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 34 Adherent::Adhesion Load (1.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 80 LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 108 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 34  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 34 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 34 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 34 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 108 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.1ms (Views: 13.1ms | ActiveRecord: 6.2ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 108 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 109 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 109 ORDER BY to_date DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 109], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 110 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 110 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 110], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/34/reglements/new" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"34"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "34"]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 108 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 34  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 34 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 34 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 34 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 110 LIMIT 1  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 82 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 109 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 81 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 27.3ms (Views: 15.2ms | ActiveRecord: 7.1ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 113) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 113) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 113], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 113) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 113) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 113], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 113) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 113) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 113], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 111 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 111 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 111], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/111/payments/new" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"111"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "111"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 113 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 111 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 83 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.7ms (Views: 9.2ms | ActiveRecord: 3.9ms) Started POST "/adherent/members/111/payments" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"111"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "111"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 111 LIMIT 1 Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 113 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 111], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 111 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 83 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 83], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["payment_id", 35], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/111/payments Completed 302 Found in 16.9ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/111/payments" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"111"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "111"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 111 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 35 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 83 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 111 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 35  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 35 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 35 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 35 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 111 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.8ms (Views: 14.0ms | ActiveRecord: 5.0ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 111 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 112 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 112 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 112], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 113 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 113 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 113], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/35/reglements/new" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"35"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "35"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 111 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 35  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 35 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 35 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 35 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 112 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 84 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 113 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 85 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25.4ms (Views: 14.8ms | ActiveRecord: 6.5ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 114) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 114) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 114], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 114) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 114) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 114], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 114) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 114) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 114], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 114 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 114 ORDER BY to_date DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 114], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/114/payments/new" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"114"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 114 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 114 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 86 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.7ms (Views: 8.9ms | ActiveRecord: 3.2ms) Started POST "/adherent/members/114/payments" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"114"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 114 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 114 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 114], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 114 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 86 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 86], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["payment_id", 36], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/114/payments Completed 302 Found in 16.8ms (ActiveRecord: 5.9ms) Started GET "/adherent/members/114/payments" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"114"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 114 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 86 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 114 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 114 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.1ms (Views: 13.3ms | ActiveRecord: 5.2ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 114 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 115 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 115 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 115], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 116 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 116 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 116], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/36/reglements/new" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"36"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 114 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 115 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 87 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 116 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 88 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 25.9ms (Views: 14.2ms | ActiveRecord: 7.2ms) Started POST "/adherent/payments/36/reglements" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"87"}, "commit"=>"Enregistrer", "payment_id"=>"36"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "87"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 87  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 87], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["payment_id", 36], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 114 LIMIT 1 Redirected to http://www.example.com/adherent/members/114/payments Completed 302 Found in 13.2ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/114/payments" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"114"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 114 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 86 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 114 LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 87 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 115 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 114 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24.0ms (Views: 16.0ms | ActiveRecord: 6.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 115) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 115) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 115], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 115) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 115) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 115], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 115) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 115) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 115], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 117 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 117 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 117], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/117/payments/new" for 127.0.0.1 at 2014-10-09 07:41:05 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"117"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (7.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 115 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 117 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 89 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 83.5ms (Views: 14.2ms | ActiveRecord: 10.3ms) Started POST "/adherent/members/117/payments" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"117"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 117 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 115 LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 117], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 117 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 89 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 89], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["payment_id", 37], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/117/payments Completed 302 Found in 18.4ms (ActiveRecord: 6.9ms) Started GET "/adherent/members/117/payments" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"117"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 117 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 89 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 117 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 117 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.8ms (Views: 13.8ms | ActiveRecord: 5.2ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 117 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 118 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 118 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 118], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 119 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 119 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 119], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/37/reglements/new" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"37"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "37"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 117 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 118 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 90 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 119 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 91 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25.6ms (Views: 14.4ms | ActiveRecord: 6.7ms) Started POST "/adherent/payments/37/reglements" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"90"}, "commit"=>"Enregistrer", "payment_id"=>"37"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "37"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "90"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 90  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 90], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["payment_id", 37], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 117 LIMIT 1 Redirected to http://www.example.com/adherent/members/117/payments Completed 302 Found in 13.0ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/117/payments" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"117"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 117 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 89 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 117 LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 90 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 118 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 117 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23.6ms (Views: 15.9ms | ActiveRecord: 6.3ms) Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 118 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 90  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 116) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 116) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 116], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 116) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 116) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 116], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 116) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 116) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 116], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 120 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 120 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 120], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/120/payments/new" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"120"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 116 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 120 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 92 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.3ms (Views: 8.8ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/120/payments" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"120"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 120 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 116 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 120], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 120 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 92 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 92], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["payment_id", 38], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/120/payments Completed 302 Found in 18.3ms (ActiveRecord: 6.0ms) Started GET "/adherent/members/120/payments" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"120"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 120 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 92 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 120 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38 CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 120 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.6ms (Views: 12.8ms | ActiveRecord: 5.1ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 120 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 121 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 121 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 121], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 122 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 122 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 122], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/38/reglements/new" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"38"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 120 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 122 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 94 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 121 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 93 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (12.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25.9ms (Views: 14.3ms | ActiveRecord: 6.9ms) Started POST "/adherent/payments/38/reglements" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"93"}, "commit"=>"Enregistrer", "payment_id"=>"38"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "93"]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 93  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 93], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["payment_id", 38], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 120 LIMIT 1 Redirected to http://www.example.com/adherent/members/120/payments Completed 302 Found in 13.6ms (ActiveRecord: 5.7ms) Started GET "/adherent/members/120/payments" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"120"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 120 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 92 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 120 LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 93 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 121 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 120 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24.3ms (Views: 16.3ms | ActiveRecord: 6.3ms) Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 117) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 117) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 117], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 117) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 117) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 117], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 117) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 117) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 117], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 123 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 123 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 123], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/123/payments/new" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"123"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 117 LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 123 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 95 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.4ms (Views: 8.6ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/123/payments" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"123"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 123 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 117 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 123], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 123 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 95 SQL (1.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 95], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["payment_id", 39], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/123/payments Completed 302 Found in 17.1ms (ActiveRecord: 6.8ms) Started GET "/adherent/members/123/payments" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"123"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (5.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 123 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 95 LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 123 LIMIT 1 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 123 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 79.7ms (Views: 16.0ms | ActiveRecord: 10.7ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 123 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 124 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 124 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 124], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 125 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 125 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 125], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/39/reglements/new" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"39"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "39"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 123 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 125 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 97 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 124 LIMIT 1  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 96 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26.6ms (Views: 15.8ms | ActiveRecord: 6.5ms) Started POST "/adherent/payments/39/reglements" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"96"}, "commit"=>"Enregistrer", "payment_id"=>"39"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "39"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "96"]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 96  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 96], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["payment_id", 39], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 123 LIMIT 1 Redirected to http://www.example.com/adherent/members/123/payments Completed 302 Found in 13.6ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/123/payments" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"123"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 123 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 95 LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 123 LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 96 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 124 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 123 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25.0ms (Views: 16.6ms | ActiveRecord: 6.6ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 96 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 124 LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 118) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 118) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 118], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 118) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 118) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 118], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 118) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 118) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 118], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 126 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 126 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 126], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/126/payments/new" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"126"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "126"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 118 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 126 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 98 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.7ms (Views: 8.9ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/126/payments" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"126"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "126"]]  (2.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 126 LIMIT 1 Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 118 LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 126], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 126 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 98 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 98], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["payment_id", 40], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/126/payments Completed 302 Found in 20.3ms (ActiveRecord: 7.7ms) Started GET "/adherent/members/126/payments" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"126"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "126"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 126 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 98 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 126 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 126 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.4ms (Views: 14.2ms | ActiveRecord: 5.2ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 126 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 127 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 127 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 127], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 128 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 128 ORDER BY to_date DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 128], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/40/reglements/new" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"40"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "40"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 126 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 127 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 99 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 128 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 100 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25.2ms (Views: 14.0ms | ActiveRecord: 6.7ms) Started POST "/adherent/payments/40/reglements" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"99"}, "commit"=>"Enregistrer", "payment_id"=>"40"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "40"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "99"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 99  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 99], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["payment_id", 40], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 126 LIMIT 1 Redirected to http://www.example.com/adherent/members/126/payments Completed 302 Found in 13.5ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/126/payments" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"126"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "126"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 126 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 98 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 126 LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 99 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 127 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 126 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24.3ms (Views: 15.1ms | ActiveRecord: 6.8ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 98 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 126 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 119) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 119) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 119], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 119) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 119) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 119], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 119) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 119) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 119], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 129 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 129 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 129], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/129/payments/new" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"129"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "129"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 119 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 129 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 101 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.4ms (Views: 9.3ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/129/payments" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/10/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"129"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "129"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 129 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 119 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 129], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 129 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 101 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 101], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00], ["payment_id", 41], ["updated_at", Thu, 09 Oct 2014 05:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/129/payments Completed 302 Found in 17.5ms (ActiveRecord: 6.1ms) Started GET "/adherent/members/129/payments" for 127.0.0.1 at 2014-10-09 07:41:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"129"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "129"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 129 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 41 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 101 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 129 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 41  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 41 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 41 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 41 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 129 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.1ms (Views: 14.1ms | ActiveRecord: 5.2ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 129 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 41  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 41  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 120) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 120) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 120], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 120) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 120) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 120], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 120) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 120) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 120], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 132 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 132 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 132], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/132/payments/new" for 127.0.0.1 at 2014-10-09 07:41:07 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"132"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 120 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 132 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 102 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.8ms (Views: 8.6ms | ActiveRecord: 3.5ms) Started POST "/adherent/members/132/payments" for 127.0.0.1 at 2014-10-09 07:41:07 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/10/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"132"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 132 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 120 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 132], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 132 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 102 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 102], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["payment_id", 42], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/132/payments Completed 302 Found in 18.2ms (ActiveRecord: 6.5ms) Started GET "/adherent/members/132/payments" for 127.0.0.1 at 2014-10-09 07:41:07 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"132"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 132 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 42 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 102 LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 132 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 42  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 42 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 42 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 42 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 132 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24.0ms (Views: 14.9ms | ActiveRecord: 6.9ms)  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 132 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 121) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 121) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 121], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 121) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 121) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 121], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 121) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 121) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 121], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 135 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 135 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 135], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/135/payments/new" for 127.0.0.1 at 2014-10-09 07:41:07 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"135"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "135"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 121 LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 135 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 103 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 20.6ms (Views: 9.6ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/135/payments" for 127.0.0.1 at 2014-10-09 07:41:07 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/10/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"135"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "135"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 135 LIMIT 1 Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 121 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 135], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 135 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 103 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 103], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["payment_id", 43], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/135/payments Completed 302 Found in 24.9ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/135/payments" for 127.0.0.1 at 2014-10-09 07:41:07 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"135"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "135"]] Adherent::Payment Load (1.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 135 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 43 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 103 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 135 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 43  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 43 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 43 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 43 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 135 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.3ms (Views: 13.8ms | ActiveRecord: 5.4ms) Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 135 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 103  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 122) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 122) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 122], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 122) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 122) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 122], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 122) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 122) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 122], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 138 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 138 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 138], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/138/payments/new" for 127.0.0.1 at 2014-10-09 07:41:07 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"138"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "138"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 122 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 138 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 104 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.5ms (Views: 8.7ms | ActiveRecord: 3.2ms) Started POST "/adherent/members/138/payments" for 127.0.0.1 at 2014-10-09 07:41:07 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/10/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"138"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "138"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 138 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 122 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 138], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 138 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 104 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 104], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["payment_id", 44], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/138/payments Completed 302 Found in 16.8ms (ActiveRecord: 6.3ms) Started GET "/adherent/members/138/payments" for 127.0.0.1 at 2014-10-09 07:41:07 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"138"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "138"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 138 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 44 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 104 LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 138 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 44  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 44 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 44 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 44 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 138 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23.2ms (Views: 15.3ms | ActiveRecord: 5.8ms)  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 138 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 123) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 123) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 123], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 141], ["to_date", Sun, 09 Nov 2014], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 141 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 141 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["from_date", Mon, 10 Nov 2014], ["member_id", 141], ["to_date", Mon, 09 Nov 2015], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 141 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 123 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 141], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 141 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 105 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 105], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["payment_id", 45], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 106 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 106], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["payment_id", 45], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"   (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 124) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 124) LIMIT 1 SQL (1.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 124], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 142], ["to_date", Sun, 09 Nov 2014], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 142 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 142 ORDER BY to_date DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["from_date", Mon, 10 Nov 2014], ["member_id", 142], ["to_date", Mon, 09 Nov 2015], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"   (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 142 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 124 LIMIT 1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 125) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 125) LIMIT 1 SQL (1.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 125], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"   (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 143], ["to_date", Sun, 09 Nov 2014], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 143 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 143 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["from_date", Mon, 10 Nov 2014], ["member_id", 143], ["to_date", Mon, 09 Nov 2015], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 143 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 125 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 143], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]] Adherent::Adhesion Load (2.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 143 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (1.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 109 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 109], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["payment_id", 46], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 126) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 126) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 126], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"   (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 144], ["to_date", Sun, 09 Nov 2014], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 144 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 144 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["from_date", Mon, 10 Nov 2014], ["member_id", 144], ["to_date", Mon, 09 Nov 2015], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 144 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 126 LIMIT 1  (0.4ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 127) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 127) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 127], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 145], ["to_date", Sun, 09 Nov 2014], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 145 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 145 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["from_date", Mon, 10 Nov 2014], ["member_id", 145], ["to_date", Mon, 09 Nov 2015], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 145 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 127 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 145], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 145 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 113 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 113], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["payment_id", 47], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 114 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 114], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["payment_id", 47], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 47  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 47  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" IS NULL  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 128) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 128) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 128], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 146 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 146 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 146], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/146/payments/new" for 127.0.0.1 at 2014-10-09 07:41:07 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"146"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "146"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 128 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 146 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.5ms (Views: 8.0ms | ActiveRecord: 2.6ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 146 Started POST "/adherent/members/146/payments" for 127.0.0.1 at 2014-10-09 07:41:07 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/10/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"146"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (4.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "146"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 146 LIMIT 1 Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 128 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 146], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 146 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/146/payments Completed 302 Found in 70.2ms (ActiveRecord: 9.7ms) Started GET "/adherent/members/146/payments" for 127.0.0.1 at 2014-10-09 07:41:07 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"146"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "146"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 146 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 48 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 48  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 48 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 48 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 48 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 146 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.5ms (Views: 10.7ms | ActiveRecord: 4.9ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 146  (0.3ms) ROLLBACK  (0.6ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 129) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 129) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 129], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 147 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 147 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 147], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/147/payments/new" for 127.0.0.1 at 2014-10-09 07:41:07 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"147"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "147"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 129 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 147 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.4ms (Views: 9.2ms | ActiveRecord: 2.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 130) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 130) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 130], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 148 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 148 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 148], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 148 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 130 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 148], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 148 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/148/payments" for 127.0.0.1 at 2014-10-09 07:41:07 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"148"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "148"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 148 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 49 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 49  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 49 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 49 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 49 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 148 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.1ms (Views: 11.5ms | ActiveRecord: 4.7ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 131) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 131) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 131], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 149 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 149 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 149], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 149 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 131 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 149], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 149 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/149/payments" for 127.0.0.1 at 2014-10-09 07:41:07 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"149"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "149"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 149 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 50 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 50  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 50 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 50 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 50 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 149 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.3ms (Views: 11.0ms | ActiveRecord: 4.5ms) Started GET "/adherent/payments/50/reglements/new" for 127.0.0.1 at 2014-10-09 07:41:07 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"50"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "50"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 149 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 50  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 50 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 50 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 50 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (7.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 18.6ms (Views: 10.6ms | ActiveRecord: 4.1ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 132) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 132) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 132], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 150 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 150 ORDER BY to_date DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 150], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/150/payments/new" for 127.0.0.1 at 2014-10-09 07:41:07 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"150"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "150"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 132 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 150 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.5ms (Views: 9.2ms | ActiveRecord: 2.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:08 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 133) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 133) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 133], ["updated_at", Thu, 09 Oct 2014 05:41:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 151 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 151 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:08 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 151], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/151/payments/new" for 127.0.0.1 at 2014-10-09 07:41:08 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"151"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "151"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 133 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 151 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.6ms (Views: 9.1ms | ActiveRecord: 2.7ms)  (0.3ms) ROLLBACK SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:08 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:08 UTC +00:00]]  (6.6ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 134) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 134) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 134], ["updated_at", Thu, 09 Oct 2014 05:41:08 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 134) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 134) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 134], ["updated_at", Thu, 09 Oct 2014 05:41:08 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 134) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 134) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 134], ["updated_at", Thu, 09 Oct 2014 05:41:08 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 134) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 134) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 134], ["updated_at", Thu, 09 Oct 2014 05:41:08 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 134) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 134) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 134], ["updated_at", Thu, 09 Oct 2014 05:41:08 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-09 07:41:12 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (2.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 134  (0.2ms) SHOW max_identifier_length  (1.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 152 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 152 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 153 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 153 LIMIT 1  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 154 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 154 LIMIT 1  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 155 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 155 LIMIT 1  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 156 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 156 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 103.3ms (Views: 61.0ms | ActiveRecord: 26.0ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2014-10-09 07:41:12 +0200 Compiled adherent/adhesion.css (0ms) (pid 6878) Compiled adherent/allpayments.css (0ms) (pid 6878) Compiled adherent/bootstrap.css (0ms) (pid 6878) Compiled adherent/coords.css (0ms) (pid 6878) Compiled adherent/date_picker.css (71ms) (pid 6878) Compiled adherent/demo_table.css (0ms) (pid 6878) Compiled adherent/jc_application.css (167ms) (pid 6878) Compiled adherent/jcmenu.css (0ms) (pid 6878) Compiled adherent/layouts.css (6ms) (pid 6878) Compiled adherent/members.css (0ms) (pid 6878) Compiled adherent/old_bootstrap.css (0ms) (pid 6878) Compiled adherent/payments.css (0ms) (pid 6878) Compiled adherent/print.css (6ms) (pid 6878) Compiled adherent/reglements.css (0ms) (pid 6878) Compiled adherent/application.css (314ms) (pid 6878) Served asset /adherent/application.css - 200 OK (327ms) Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2014-10-09 07:41:12 +0200 Compiled adherent/adhesion.js (0ms) (pid 6878) Compiled adherent/allpayments.js (0ms) (pid 6878) Compiled adherent/bootstrap.js (54ms) (pid 6878) Compiled adherent/coords.js (0ms) (pid 6878) Compiled adherent/date_picker.js (0ms) (pid 6878) Compiled adherent/jquery.dataTables.min.js (1ms) (pid 6878) Compiled adherent/members.js (0ms) (pid 6878) Compiled adherent/payments.js (0ms) (pid 6878) Compiled adherent/reglements.js (0ms) (pid 6878) Compiled adherent/application.js (94ms) (pid 6878) Served asset /adherent/application.js - 200 OK (108ms) Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2014-10-09 07:41:12 +0200 Served asset /adherent/icones/nouveau.png - 200 OK (4ms) Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2014-10-09 07:41:12 +0200 Served asset /adherent/icones/payment.png - 200 OK (110ms) Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2014-10-09 07:41:12 +0200 Served asset /adherent/icones/modifier.png - 200 OK (8ms) Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2014-10-09 07:41:12 +0200 Served asset /adherent/icones/card-address.png - 200 OK (3ms) Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2014-10-09 07:41:12 +0200 Served asset /adherent/icones/bandaid.png - 200 OK (3ms) Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2014-10-09 07:41:12 +0200 Served asset /adherent/icones/supprimer.png - 200 OK (4ms) Started GET "/assets/images/sort_asc.png" for 127.0.0.1 at 2014-10-09 07:41:12 +0200 Served asset /images/sort_asc.png - 200 OK (6ms) Started GET "/assets/images/sort_both.png" for 127.0.0.1 at 2014-10-09 07:41:12 +0200 Served asset /images/sort_both.png - 200 OK (3ms) Started GET "/assets/images/forward_disabled.png" for 127.0.0.1 at 2014-10-09 07:41:12 +0200 Served asset /images/forward_disabled.png - 200 OK (7ms) Started GET "/assets/images/back_disabled.png" for 127.0.0.1 at 2014-10-09 07:41:12 +0200 Served asset /images/back_disabled.png - 200 OK (3ms) Started DELETE "/adherent/members/152" for 127.0.0.1 at 2014-10-09 07:41:13 +0200 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"152"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "152"]]  (0.2ms) BEGIN Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 152 LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 152]]  (65.9ms) COMMIT Redirected to http://127.0.0.1:40376/adherent/members Completed 302 Found in 78.0ms (ActiveRecord: 69.7ms) Started GET "/adherent/members" for 127.0.0.1 at 2014-10-09 07:41:13 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 134  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 153 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 153 LIMIT 1  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 154 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 154 LIMIT 1  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 155 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 155 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 156 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 156 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 37.3ms (Views: 25.5ms | ActiveRecord: 8.5ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_members"  (0.7ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (1.6ms) select table_name from information_schema.views where table_schema = 'adh_test'  (93.2ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "adherent_reglements", "organisms", "adherent_members", "adherent_payments" RESTART IDENTITY CASCADE;  (1.0ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (1.2ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:14 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:14 UTC +00:00]]  (2.4ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:14 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.6ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:14 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:14 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:14 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1 ORDER BY to_date DESC LIMIT 1  (0.3ms) BEGIN SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:14 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 1], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:14 UTC +00:00]]  (1.3ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2014-10-09 07:41:14 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.7ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 1 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.8ms (Views: 11.7ms | ActiveRecord: 5.2ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2014-10-09 07:41:14 +0200 Served asset /adherent/icones/users.png - 200 OK (7ms) Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2014-10-09 07:41:15 +0200 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (3.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1 AND "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "1"]]  (0.1ms) BEGIN SQL (0.9ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (116.3ms) COMMIT Redirected to http://127.0.0.1:40376/adherent/members/1/adhesions Completed 302 Found in 130.1ms (ActiveRecord: 121.6ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2014-10-09 07:41:15 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1 Redirected to http://127.0.0.1:40376/adherent/members/1/adhesions/new Completed 302 Found in 5.5ms (ActiveRecord: 1.8ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2014-10-09 07:41:15 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (6.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.8ms (Views: 10.5ms | ActiveRecord: 2.9ms) Started GET "/assets/adherent/cal.gif" for 127.0.0.1 at 2014-10-09 07:41:15 +0200 Served asset /adherent/cal.gif - 200 OK (4ms)  (1.2ms) SELECT COUNT(*) FROM "adherent_adhesions"  (1.0ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (152.3ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "adherent_reglements", "organisms", "adherent_members", "adherent_payments" RESTART IDENTITY CASCADE;  (1.0ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (0.9ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:16 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:16 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:16 UTC +00:00]]  (2.4ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:16 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:16 UTC +00:00]]  (2.2ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:16 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:16 UTC +00:00]]  (1.0ms) COMMIT Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.4ms) BEGIN Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 1 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 1 LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:16 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Thu, 09 Oct 2014 05:41:16 UTC +00:00]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (1.4ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2014-10-09 07:41:16 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 1 AND "adherent_payments"."id" = 1 LIMIT 1 Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 1 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 CACHE (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (6.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 37.5ms (Views: 23.9ms | ActiveRecord: 9.0ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2014-10-09 07:41:16 +0200 Served asset /adherent/application.css - 304 Not Modified (0ms) Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2014-10-09 07:41:16 +0200 Served asset /adherent/icones/printer.png - 200 OK (4ms) Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2014-10-09 07:41:16 +0200 Served asset /adherent/icones/money-plus.png - 200 OK (62ms) Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2014-10-09 07:41:16 +0200 Served asset /adherent/icones/imputation.png - 200 OK (4ms) Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2014-10-09 07:41:16 +0200 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (2.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 1 AND "adherent_payments"."id" = $1 LIMIT 1 [["id", "1"]]  (0.1ms) BEGIN Adherent::Reglement Load (1.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 SQL (0.9ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (106.1ms) COMMIT Redirected to http://127.0.0.1:40376/adherent/members/1/payments Completed 302 Found in 124.2ms (ActiveRecord: 112.2ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2014-10-09 07:41:17 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 1 Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 9.7ms (Views: 5.7ms | ActiveRecord: 2.1ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2014-10-09 07:41:17 +0200 Served asset /adherent/application.css - 304 Not Modified (0ms)  (1.8ms) SELECT COUNT(*) FROM "adherent_payments"  (0.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (127.5ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "adherent_reglements", "organisms", "adherent_members", "adherent_payments" RESTART IDENTITY CASCADE;  (2.6ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL  (0.4ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members/1/coord/new" for 127.0.0.1 at 2014-10-09 07:41:18 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 1 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39.8ms (Views: 18.9ms | ActiveRecord: 4.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members/2/coord/new" for 127.0.0.1 at 2014-10-09 07:41:18 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"2"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 2 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.8ms (Views: 12.3ms | ActiveRecord: 1.8ms) Started POST "/adherent/members/2/coord" for 127.0.0.1 at 2014-10-09 07:41:18 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"2"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 2 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 2], ["office", ""], ["tel", ""], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/2/adhesions/new Completed 302 Found in 10.9ms (ActiveRecord: 4.0ms) Started GET "/adherent/members/2/adhesions/new" for 127.0.0.1 at 2014-10-09 07:41:18 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"2"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 2 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 2 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (5.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.8ms (Views: 9.2ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members/3/coord/new" for 127.0.0.1 at 2014-10-09 07:41:18 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"3"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 3 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.5ms (Views: 12.8ms | ActiveRecord: 1.8ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_coords"  Started POST "/adherent/members/3/coord" for 127.0.0.1 at 2014-10-09 07:41:18 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"3"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 3 LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 3], ["office", ""], ["tel", ""], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["zip", ""]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/3/adhesions/new Completed 302 Found in 9.6ms (ActiveRecord: 3.6ms) Started GET "/adherent/members/3/adhesions/new" for 127.0.0.1 at 2014-10-09 07:41:18 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"3"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 3 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 3 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (5.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.7ms (Views: 8.8ms | ActiveRecord: 2.4ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members/4/coord/new" for 127.0.0.1 at 2014-10-09 07:41:18 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 4 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.0ms (Views: 12.5ms | ActiveRecord: 1.7ms) Started POST "/adherent/members/4/coord" for 127.0.0.1 at 2014-10-09 07:41:18 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 4 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 4], ["office", ""], ["tel", ""], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/4/adhesions/new Completed 302 Found in 9.5ms (ActiveRecord: 3.2ms) Started GET "/adherent/members/4/adhesions/new" for 127.0.0.1 at 2014-10-09 07:41:18 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"4"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 4 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 4 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (5.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 75.1ms (Views: 8.7ms | ActiveRecord: 2.4ms) Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 4 LIMIT 1  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.4ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (1.0ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" IS NULL ORDER BY to_date DESC LIMIT 1  (0.1ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" IS NULL ORDER BY to_date DESC LIMIT 1  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" IS NULL ORDER BY to_date DESC LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 5 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 5 ORDER BY to_date DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 5], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 5 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 5 ORDER BY to_date DESC LIMIT 1  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 6 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 6 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 6], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 6 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 6 ORDER BY to_date DESC LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 7 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 7 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 7], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 7 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 7 ORDER BY to_date DESC LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.6ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6143db2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.6ms (Views: 1.1ms | ActiveRecord: 2.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x616c35c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x616c35c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5.5ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x61a7b78 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.7ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x62c91d2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x62c91d2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6.0ms (ActiveRecord: 2.0ms)  (0.8ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x62e7ad8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.6ms (Views: 1.8ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x62fc762 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x62fc762%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6.6ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x6308120 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.1ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6432f64 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.8ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"09/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x643dfcc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x643dfcc%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5.8ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"09/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x6447d88 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6447d88%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5.6ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"09/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x6467494 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10.1ms (Views: 1.0ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x648bab0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.6ms (Views: 1.2ms | ActiveRecord: 2.1ms)  (0.5ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x649ac22 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.8ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.1ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", nil], ["city", "Lille"], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["gsm", nil], ["mail", nil], ["member_id", 11], ["office", nil], ["tel", nil], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["zip", 59000]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 11 LIMIT 1  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 4]] SQL (0.8ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 11]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_coords"   (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.6ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.6ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 1], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 4  (0.3ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 4], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["payment_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 4  (0.8ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 1], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 5  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 5], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["payment_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 5  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 5  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 1], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 6  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 6], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["payment_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.7ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 18], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"   (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 12], ["to_date", Sat, 31 Aug 2013], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 13], ["to_date", Sat, 31 Aug 2013], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 13 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 18 LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 13], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 13 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 8 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 8], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["payment_id", 1], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 19], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"   (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 14], ["to_date", Sat, 31 Aug 2013], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 15], ["to_date", Sat, 31 Aug 2013], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 15 LIMIT 1 Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 19 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 15], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 15 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 10 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 10], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["payment_id", 2], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 14 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 19 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 14], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 14 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 9 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 9], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["payment_id", 3], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 20], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"   (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 16], ["to_date", Sat, 31 Aug 2013], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 17], ["to_date", Sat, 31 Aug 2013], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 17 LIMIT 1 Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 20 LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 17], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 17 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 12 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 12], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["payment_id", 4], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 17 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 20 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 17], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 17 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 12 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 12], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["payment_id", 5], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 16 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 20 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["date", Thu, 09 Oct 2014], ["member_id", 16], ["mode", "CB"], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 16 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 11 SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 11], ["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["payment_id", 6], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 21], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 21], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 21], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 21], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-09 07:41:19 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 21  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 18 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 18 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 19 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 19 LIMIT 1  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 20 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 20 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 21 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 21 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 22 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 22 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 44.9ms (Views: 32.2ms | ActiveRecord: 9.6ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 22], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 22], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 22], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 22], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members" for 127.0.0.1 at 2014-10-09 07:41:19 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 22  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 23 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 23 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 24 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 24 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 25 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 25 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 26 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 26 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 27 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 27 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 45.2ms (Views: 33.3ms | ActiveRecord: 8.9ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 23], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 23], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 23], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 23], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members/new" for 127.0.0.1 at 2014-10-09 07:41:19 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.9ms (Views: 12.9ms | ActiveRecord: 0.8ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2014-10-09 07:41:19 +0200 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 23], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/33/coord/new Completed 302 Found in 8.5ms (ActiveRecord: 2.6ms) Started GET "/adherent/members/33/coord/new" for 127.0.0.1 at 2014-10-09 07:41:19 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"33"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "33"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 33 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.9ms (Views: 13.4ms | ActiveRecord: 1.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members"   (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.9ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 24], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 24], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 24], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 24], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-09 07:41:19 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 24  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 34 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 34 LIMIT 1  (1.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 35 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (1.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 35 LIMIT 1  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 36 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 36 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 37 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 37 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 38 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 38 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 42.9ms (Views: 29.6ms | ActiveRecord: 10.9ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Started GET "/adherent/members/34/coord" for 127.0.0.1 at 2014-10-09 07:41:19 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"34"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "34"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 34 LIMIT 1 Redirected to http://www.example.com/adherent/members/34/coord/new Completed 302 Found in 5.6ms (ActiveRecord: 1.6ms) Started GET "/adherent/members/34/coord/new" for 127.0.0.1 at 2014-10-09 07:41:19 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"34"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "34"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 34 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.3ms (Views: 11.9ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 25], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 25], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 25], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 25], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-09 07:41:19 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 25  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 39 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 39 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 40 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 40 LIMIT 1  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 41 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 41 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 42 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 42 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 43 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 43 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 41.8ms (Views: 29.6ms | ActiveRecord: 9.4ms) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Started GET "/adherent/members/39/payments" for 127.0.0.1 at 2014-10-09 07:41:19 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"39"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "39"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 39 Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 8.7ms (Views: 5.0ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 26], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 26], ["updated_at", Thu, 09 Oct 2014 05:41:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 26], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 26], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members" for 127.0.0.1 at 2014-10-09 07:41:20 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 26  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 44 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 44 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 45 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 45 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 46 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 46 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 47 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 47 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 48 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 48 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40.8ms (Views: 29.7ms | ActiveRecord: 9.0ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2014-10-09 07:41:20 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (5.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 11.2ms (Views: 8.7ms | ActiveRecord: 0.6ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 27], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 27], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 27], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 27], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 27], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members" for 127.0.0.1 at 2014-10-09 07:41:20 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 27  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 49 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 49 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 50 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 50 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 51 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 51 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 52 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 52 LIMIT 1  (1.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 53 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 53 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40.7ms (Views: 28.8ms | ActiveRecord: 9.5ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Started GET "/adherent/members/49/edit" for 127.0.0.1 at 2014-10-09 07:41:20 +0200 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"49"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "49"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (6.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14.3ms (Views: 10.9ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 28], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 28], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 28], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 28], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members" for 127.0.0.1 at 2014-10-09 07:41:20 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 28  (1.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 54 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 54 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 55 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 55 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 56 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 56 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 57 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 57 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 58 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 58 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 43.6ms (Views: 30.9ms | ActiveRecord: 10.0ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", nil], ["city", "Marseille"], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["gsm", nil], ["mail", nil], ["member_id", 54], ["office", nil], ["tel", nil], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["zip", nil]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 54 LIMIT 1 Started GET "/adherent/members/54/coord" for 127.0.0.1 at 2014-10-09 07:41:20 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"54"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "54"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 54 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 12.4ms (Views: 7.3ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 29], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 29], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 29], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 29], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-09 07:41:20 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 29  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 59 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 59 LIMIT 1  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 60 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 60 LIMIT 1  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 61 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 61 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 62 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 62 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 63 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 63 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 117.0ms (Views: 104.0ms | ActiveRecord: 9.9ms) Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 59 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 59 ORDER BY to_date DESC LIMIT 1  (0.7ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["from_date", Thu, 09 Oct 2014], ["member_id", 59], ["to_date", Thu, 08 Oct 2015], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/59/adhesions" for 127.0.0.1 at 2014-10-09 07:41:20 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"59"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "59"]]  (0.5ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 59 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 59  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 13 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 13 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13.4ms (Views: 7.2ms | ActiveRecord: 3.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 30], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 30], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 30], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 30], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members" for 127.0.0.1 at 2014-10-09 07:41:20 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 30  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 64 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 64 LIMIT 1  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 65 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 65 LIMIT 1  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 66 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 66 LIMIT 1  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 67 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 67 LIMIT 1  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 68 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 68 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 42.2ms (Views: 32.2ms | ActiveRecord: 7.3ms) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Started GET "/adherent/members/64/adhesions" for 127.0.0.1 at 2014-10-09 07:41:20 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"64"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "64"]]  (0.4ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 64 Redirected to http://www.example.com/adherent/members/64/adhesions/new Completed 302 Found in 4.9ms (ActiveRecord: 1.2ms) Started GET "/adherent/members/64/adhesions/new" for 127.0.0.1 at 2014-10-09 07:41:20 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"64"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "64"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 64 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 64 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (5.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.7ms (Views: 9.8ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62e2024 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.4ms (Views: 1.5ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62fa96c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.1ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6307a0e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6307a0e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6.9ms (ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x642edf6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.3ms (Views: 1.6ms | ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x643869e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x643869e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 8.1ms (ActiveRecord: 3.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6442932 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x645a956 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (2.4ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8.3ms (Views: 1.1ms | ActiveRecord: 3.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x647193a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12.7ms (Views: 1.2ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x648b48e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x648b48e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6.4ms (ActiveRecord: 2.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x649ed72 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.0ms (Views: 1.1ms | ActiveRecord: 2.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64bf7b6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Thu, 09 Oct 2014 05:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.3ms (Views: 0.9ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK Connecting to database specified by database.yml  (0.5ms) BEGIN Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml (30.4ms)  (0.4ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN  (0.4ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN  (0.6ms) ROLLBACK Connecting to database specified by database.yml  (0.3ms) BEGIN  (0.4ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN  (0.5ms) ROLLBACK Connecting to database specified by database.yml  (0.1ms) BEGIN  (0.3ms) ROLLBACK Connecting to database specified by database.yml  (0.5ms) BEGIN  (0.5ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml (33.3ms)  (0.4ms) ROLLBACK Connecting to database specified by database.yml  (0.3ms) BEGIN  (0.5ms) ROLLBACK Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x4e7300c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (4.9ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (0.3ms) Completed 200 OK in 35.6ms (Views: 8.1ms | ActiveRecord: 10.2ms)  (0.7ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x552558a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x552558a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5.3ms (ActiveRecord: 1.1ms)  (0.5ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x556a270 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8.1ms (Views: 1.6ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x55a1626 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.2ms (Views: 1.7ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x566385c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x566385c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6.2ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.6ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x56b6bba @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11.2ms (Views: 1.0ms | ActiveRecord: 2.8ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x56fc3ea @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x56fc3ea%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7.0ms (ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x57194d6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.6ms (Views: 1.6ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.8ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5738232 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.7ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5752538 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5752538%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6.1ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5778576 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.6ms (Views: 0.9ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5793a9c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5793a9c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6.0ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (42.6ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x48f7772 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 04:59:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.6ms (Views: 1.2ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (5.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" INNER JOIN "adherent_members" ON "adherent_payments"."member_id" = "adherent_members"."id" WHERE "adherent_members"."organism_id" = 55 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/allpayments/index.html.haml within layouts/adherent/application (0.4ms) Completed 200 OK in 113.5ms (Views: 7.9ms | ActiveRecord: 22.1ms)  (1.1ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5b06ca6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.1ms (Views: 2.1ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5c86978 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8.2ms (Views: 2.4ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5d8ef28 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5d8ef28%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6.1ms (ActiveRecord: 1.9ms)  (0.6ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5dc6d10 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.9ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5df6538 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.7ms (Views: 1.5ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e3f3dc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (2.0ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.2ms (Views: 1.1ms | ActiveRecord: 3.4ms)  (0.1ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5f1d98e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11.8ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5fb04f0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5fb04f0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6.0ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5fd3ad6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5fd3ad6%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5.9ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5fe8c06 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5fe8c06%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6.5ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x6005446 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x602b498 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.6ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x6045974 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6045974%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6.2ms (ActiveRecord: 2.2ms)  (2.1ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8.7ms (Views: 3.0ms | ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.3ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8.2ms (Views: 1.8ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 72 Completed 200 OK in 54.8ms (Views: 48.3ms | ActiveRecord: 2.5ms)  (0.5ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8.1ms (Views: 1.7ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.2ms (Views: 0.8ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x593bf7a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6.6ms (ActiveRecord: 2.7ms)  (1.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x59cc836 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6.1ms (ActiveRecord: 2.2ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"69"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 69 AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.8ms) UPDATE "adherent_members" SET "name" = 'Dalton', "updated_at" = '2014-10-10 05:09:54.806970' WHERE "adherent_members"."id" = 69  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/69 Completed 302 Found in 13.8ms (ActiveRecord: 3.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"70"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/70 Completed 302 Found in 5.8ms (ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"71"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"72"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/72 Completed 302 Found in 5.5ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8.1ms (Views: 1.6ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.8ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 83) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 83], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/73/coord/new Completed 302 Found in 11.5ms (ActiveRecord: 3.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 84) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 84], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/74/coord/new Completed 302 Found in 11.1ms (ActiveRecord: 4.1ms)  (1.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 85) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 85], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/75/coord/new Completed 302 Found in 10.6ms (ActiveRecord: 4.0ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x5fda872 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5fda8b8%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6.1ms (ActiveRecord: 2.2ms)  (0.1ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5ff4fb0 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8.5ms (Views: 2.3ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x601fb02 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6038fb2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8.8ms (Views: 2.8ms | ActiveRecord: 2.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x605a964 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.8ms (Views: 1.6ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x607985a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.2ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x608edfe @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.9ms (Views: 1.6ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x60ab058 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.9ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x60c8874 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.6ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x60ed8ae @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x60ed8ae%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6.4ms (ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x610be94 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x610be94%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6.0ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x615cb14 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.1ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x616cfdc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.7ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x61a1c78 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x61a1c78%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6.2ms (ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6188b1a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.2ms (Views: 2.3ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62b1316 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x62b07ea @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.9ms (Views: 1.7ms | ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x62d18fa @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.8ms (Views: 1.1ms | ActiveRecord: 2.3ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x62f1de4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x62f1de4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6.3ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x63083d2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x63083d2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5.6ms (ActiveRecord: 1.8ms)  (0.1ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6327fb6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.8ms (Views: 1.7ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x633ca92 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:09:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.5ms (Views: 1.1ms | ActiveRecord: 2.2ms)  (1.7ms) ROLLBACK Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5bdd292 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (5.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (0.3ms) Completed 200 OK in 38.5ms (Views: 7.4ms | ActiveRecord: 10.3ms)  (0.7ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x61a0f30 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x61a0f30%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5.9ms (ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x61bc384 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x61bc384%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5.7ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x61d9240 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10.5ms (Views: 1.9ms | ActiveRecord: 2.5ms)  (0.5ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x61f6480 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11.0ms (Views: 1.7ms | ActiveRecord: 2.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x621351c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x621351c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 9.3ms (ActiveRecord: 3.4ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x622a816 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x622a816%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6.7ms (ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x624d0dc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 51.5ms (Views: 1.1ms | ActiveRecord: 3.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x56dffec @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.4ms (Views: 1.1ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x597a95a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.9ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (1.5ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ba1666 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.8ms (Views: 1.7ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5c456da @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.8ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5c456da%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6.4ms (ActiveRecord: 2.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5db0416 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:19:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.4ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK Connecting to database specified by database.yml  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.5ms) ROLLBACK Connecting to database specified by database.yml  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x4fcff7c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.7ms) SAVEPOINT active_record_1 SQL (5.3ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/edit.html.erb within layouts/adherent/application (0.3ms) Completed 200 OK in 37.3ms (Views: 7.2ms | ActiveRecord: 10.3ms)  (0.8ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5650162 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.7ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x56a3902 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.4ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x56d58a8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.3ms (Views: 1.0ms | ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x57925fc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x57925fc%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6.2ms (ActiveRecord: 1.7ms)  (0.1ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x57af788 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x57af788%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5.7ms (ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x57c79d2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9.0ms (Views: 1.6ms | ActiveRecord: 3.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x57df50a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12.6ms (Views: 1.2ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x586aed4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x586aed4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6.5ms (ActiveRecord: 2.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5891f8e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5891f8e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6.6ms (ActiveRecord: 1.6ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x58ad50e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.6ms (Views: 1.7ms | ActiveRecord: 2.5ms)  (0.6ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x58be08e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x58be08e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5.8ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x4c9457e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:20:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.8ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (1.7ms) ROLLBACK Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x4bb460e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (5.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (0.3ms) Completed 200 OK in 39.8ms (Views: 7.3ms | ActiveRecord: 10.5ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x524a22a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.2ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x528402e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x528402e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6.2ms (ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x52ba048 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x52ba048%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 8.1ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x53869a4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.9ms (Views: 1.6ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x53a3568 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.9ms (Views: 1.2ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x53bb1e0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x53bb1e0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5.5ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x53d2084 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11.7ms (Views: 1.7ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5461c3e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5461c3e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5.5ms (ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x547ad06 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x547ad06%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5.3ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x54a0376 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8.1ms (Views: 1.3ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x54b6db0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 53.4ms (Views: 48.0ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x463543a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:29 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.2ms (Views: 1.1ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN  (1.4ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x50be640 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (6.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00]]  (1.2ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (0.3ms) Completed 200 OK in 37.6ms (Views: 7.4ms | ActiveRecord: 12.4ms)  (1.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5591096 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.2ms (Views: 2.1ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x55d4d32 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00]]  (1.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.8ms (Views: 1.1ms | ActiveRecord: 2.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5611598 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11.0ms (Views: 1.0ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x574ddda @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x574ddda%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5.7ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x57644cc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x57644cc%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5.6ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5780226 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.1ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x57a6106 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.3ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x57c39c2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x57c39c2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5.2ms (ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x57e176a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x57e176a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 48.4ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x49b3b98 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.8ms (Views: 1.6ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x4e263ec @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.7ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x50efb96 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:23:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x50efb96%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5.0ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml (32.3ms)  (0.3ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml (33.1ms)  (0.4ms) ROLLBACK Connecting to database specified by database.yml  (0.5ms) BEGIN  (0.5ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN  (0.9ms) ROLLBACK Connecting to database specified by database.yml  (0.3ms) BEGIN  (0.5ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN SQL (1.3ms) DELETE FROM "adherent_members" Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (6.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 159) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 159) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 159], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 76 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 76 ORDER BY to_date DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 76], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/76/payments/new" for 127.0.0.1 at 2014-10-10 07:30:22 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"76"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "76"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 159 LIMIT 1 Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 76 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (22.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (29.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 108.9ms (Views: 85.2ms | ActiveRecord: 6.5ms)  (0.8ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 160) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 160) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 160], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 77 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 77 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 77], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/77/payments/new" for 127.0.0.1 at 2014-10-10 07:30:22 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"77"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "77"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 160 LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 77 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (6.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.5ms (Views: 9.7ms | ActiveRecord: 2.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 161) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 161) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 161], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 78 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 78 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 78], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 78 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 161 LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 78], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 78 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/78/payments" for 127.0.0.1 at 2014-10-10 07:30:22 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"78"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "78"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 78 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 78 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (22.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29.3ms (Views: 20.7ms | ActiveRecord: 6.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 162) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 162) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 162], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 79 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 79 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 79], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 79 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 162 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 79], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 79 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/79/payments" for 127.0.0.1 at 2014-10-10 07:30:22 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"79"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "79"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 79 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 79 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (12.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.5ms (Views: 11.0ms | ActiveRecord: 5.5ms) Started GET "/adherent/payments/8/reglements/new" for 127.0.0.1 at 2014-10-10 07:30:22 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"8"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 79 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33.7ms (Views: 16.6ms | ActiveRecord: 5.3ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 163) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 163) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 163], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 80 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 80 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 80], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/80/payments/new" for 127.0.0.1 at 2014-10-10 07:30:22 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"80"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "80"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 163 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 80 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 19.4ms (Views: 10.7ms | ActiveRecord: 2.7ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 80 Started POST "/adherent/members/80/payments" for 127.0.0.1 at 2014-10-10 07:30:22 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"80"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "80"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 80 LIMIT 1 Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 163 LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 80], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 80 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/80/payments Completed 302 Found in 13.3ms (ActiveRecord: 3.9ms) Started GET "/adherent/members/80/payments" for 127.0.0.1 at 2014-10-10 07:30:22 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"80"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "80"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 80 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9 Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 80 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.5ms (Views: 12.0ms | ActiveRecord: 3.2ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 80  (0.2ms) ROLLBACK  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 164) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 164) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 164], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 81 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 81 ORDER BY to_date DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 81], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:30:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/81/payments/new" for 127.0.0.1 at 2014-10-10 07:30:22 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"81"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "81"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 164 LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 81 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 19.6ms (Views: 11.8ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN  (0.4ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN  (0.5ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN  (0.3ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN SQL (1.1ms) DELETE FROM "adherent_members" Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (6.9ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 165) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 165) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 165], ["updated_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 82 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 82 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 82], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 82 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 165 LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 82], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 82 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/82/payments" for 127.0.0.1 at 2014-10-10 07:35:10 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"82"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "82"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 82 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 82 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (25.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.1ms) Completed 200 OK in 88.1ms (Views: 37.4ms | ActiveRecord: 6.7ms)  (1.0ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.0ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 166) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 166) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 166], ["updated_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 83 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 83 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 83], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 83 LIMIT 1 Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 166 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 83], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 83 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/83/payments" for 127.0.0.1 at 2014-10-10 07:35:10 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"83"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "83"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 83 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 83 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (13.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.7ms (Views: 12.1ms | ActiveRecord: 5.5ms) Started GET "/adherent/payments/11/reglements/new" for 127.0.0.1 at 2014-10-10 07:35:10 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"11"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 83 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (23.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (28.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 47.7ms (Views: 31.0ms | ActiveRecord: 5.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 167) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 167) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 167], ["updated_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 84 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 84 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 84], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/84/payments/new" for 127.0.0.1 at 2014-10-10 07:35:10 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"84"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "84"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 167 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 84 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (12.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28.0ms (Views: 16.8ms | ActiveRecord: 2.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 168) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 168) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 168], ["updated_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 85 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 85 ORDER BY to_date DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 85], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/85/payments/new" for 127.0.0.1 at 2014-10-10 07:35:10 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"85"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "85"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 168 LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 85 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (7.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.4ms (Views: 10.1ms | ActiveRecord: 2.0ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 85 Started POST "/adherent/members/85/payments" for 127.0.0.1 at 2014-10-10 07:35:11 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"85"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "85"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (2.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 85 LIMIT 1 Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 168 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 85], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 85 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/85/payments Completed 302 Found in 59.8ms (ActiveRecord: 7.6ms) Started GET "/adherent/members/85/payments" for 127.0.0.1 at 2014-10-10 07:35:11 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"85"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "85"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 85 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 12 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 12  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 12 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 12 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 12 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 85 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.5ms (Views: 11.1ms | ActiveRecord: 4.5ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 85  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 169) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 169) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 169], ["updated_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 86 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 86 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 86], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/86/payments/new" for 127.0.0.1 at 2014-10-10 07:35:11 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"86"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "86"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 169 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 86 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.3ms (Views: 10.4ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 170) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 170) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 170], ["updated_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 87 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 87 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 87], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/87/payments/new" for 127.0.0.1 at 2014-10-10 07:35:11 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"87"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "87"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 170 LIMIT 1 Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 87 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (6.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.1ms (Views: 9.4ms | ActiveRecord: 3.4ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 171) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 171) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 171], ["updated_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 88 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 88 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 88], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:35:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK Connecting to database specified by database.yml  (0.3ms) BEGIN SQL (1.1ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (6.2ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 172) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 172) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 172], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 89 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 89 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 89], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 89 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 172 LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 89], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 89 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1  (1.0ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 173) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 173) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 173], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 90 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 90 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 90], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/90/payments/new" for 127.0.0.1 at 2014-10-10 07:39:40 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"90"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "90"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 173 LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 90 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (23.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (30.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.1ms) Completed 200 OK in 60.2ms (Views: 47.4ms | ActiveRecord: 3.8ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 174) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 174) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 174], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 91 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 91 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 91], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/91/payments/new" for 127.0.0.1 at 2014-10-10 07:39:40 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"91"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "91"]] Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 174 LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 91 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 18.8ms (Views: 10.1ms | ActiveRecord: 3.4ms)  (0.5ms) ROLLBACK  (0.6ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 175) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 175) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 175], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (1.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 92 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 92 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 92], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 92 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 175 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 92], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 92 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/92/payments" for 127.0.0.1 at 2014-10-10 07:39:40 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"92"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "92"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 92 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 14 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 14  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 14 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 14 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 14 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 92 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (22.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30.3ms (Views: 21.0ms | ActiveRecord: 6.1ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 176) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 176) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 176], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 93 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 93 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 93], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 93 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 176 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 93], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 93 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/93/payments" for 127.0.0.1 at 2014-10-10 07:39:40 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"93"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 93 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 15 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 15  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 15 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 15 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 15 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 93 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.1ms (Views: 12.1ms | ActiveRecord: 4.9ms) Started GET "/adherent/payments/15/reglements/new" for 127.0.0.1 at 2014-10-10 07:39:40 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"15"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 93 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 15  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 15 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 15 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 15 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (14.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33.9ms (Views: 16.7ms | ActiveRecord: 4.8ms)  (0.7ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 177) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 177) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 177], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 94 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 94 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 94], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/94/payments/new" for 127.0.0.1 at 2014-10-10 07:39:40 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"94"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "94"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 177 LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 94 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (7.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 19.1ms (Views: 9.9ms | ActiveRecord: 2.5ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 94 Started POST "/adherent/members/94/payments" for 127.0.0.1 at 2014-10-10 07:39:40 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"94"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "94"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 94 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 177 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 94], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 94 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/94/payments Completed 302 Found in 13.9ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/94/payments" for 127.0.0.1 at 2014-10-10 07:39:40 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"94"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "94"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 94 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 16 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 16  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 16 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 16 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 16 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 94 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (11.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 17.2ms (Views: 10.9ms | ActiveRecord: 4.6ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 94  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 178) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 178) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 178], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 95 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 95 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 95], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:39:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/95/payments/new" for 127.0.0.1 at 2014-10-10 07:39:40 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"95"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "95"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 178 LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 95 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (7.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.7ms (Views: 10.3ms | ActiveRecord: 2.5ms)  (0.5ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN SQL (1.1ms) DELETE FROM "adherent_members" Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (5.2ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 179) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 179) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 179], ["updated_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 96 Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 96 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 96], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 96 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 179 LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 96], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 96 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/96/payments/17" for 127.0.0.1 at 2014-10-10 07:40:16 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"96", "id"=>"17"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "96"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 96 AND "adherent_payments"."id" = 17 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 17  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 17 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 96 LIMIT 1 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 17 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 17 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 17 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (7.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (30.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 100.6ms (Views: 45.1ms | ActiveRecord: 7.3ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (2.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (3.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 180) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 180) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 180], ["updated_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 97 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 97 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 97], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 97 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 180 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 97], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 97 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/97/payments" for 127.0.0.1 at 2014-10-10 07:40:16 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"97"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "97"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 97 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 18 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 18  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 18 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 18 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 18 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 97 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (17.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 24.9ms (Views: 18.3ms | ActiveRecord: 4.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 181) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 181) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 181], ["updated_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 98 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 98 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 98], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 98 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 181 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 98], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 98 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/98/payments" for 127.0.0.1 at 2014-10-10 07:40:16 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"98"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "98"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 98 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 98 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.1ms (Views: 10.7ms | ActiveRecord: 4.7ms) Started GET "/adherent/payments/19/reglements/new" for 127.0.0.1 at 2014-10-10 07:40:16 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"19"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "19"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 98 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (23.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (27.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 47.6ms (Views: 30.4ms | ActiveRecord: 5.1ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 182) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 182) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 182], ["updated_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 99 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 99 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 99], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:40:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/99/payments/new" for 127.0.0.1 at 2014-10-10 07:40:16 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"99"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "99"]] Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 182 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 99 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23.2ms (Views: 14.0ms | ActiveRecord: 3.4ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 99 Started POST "/adherent/members/99/payments" for 127.0.0.1 at 2014-10-10 07:40:17 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"99"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "99"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 99 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 182 LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 99], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 99 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/99/payments Completed 302 Found in 15.7ms (ActiveRecord: 6.5ms) Started GET "/adherent/members/99/payments" for 127.0.0.1 at 2014-10-10 07:40:17 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"99"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "99"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 99 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 20 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 20  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 20 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 20 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 20 Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 99 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 19.8ms (Views: 12.6ms | ActiveRecord: 5.4ms)  (1.2ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 99  (0.4ms) ROLLBACK  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 183) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 183) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 183], ["updated_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 100 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 100 ORDER BY to_date DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 100], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/100/payments/new" for 127.0.0.1 at 2014-10-10 07:40:17 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"100"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "100"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 183 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 100 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (7.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.2ms (Views: 9.5ms | ActiveRecord: 2.7ms)  (0.5ms) ROLLBACK  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 184) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 184) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 184], ["updated_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 101 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 101 ORDER BY to_date DESC LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 101], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/101/payments/new" for 127.0.0.1 at 2014-10-10 07:40:17 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"101"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "101"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 184 LIMIT 1 Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 101 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 19.0ms (Views: 10.8ms | ActiveRecord: 3.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (1.1ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 185) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 185) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 185], ["updated_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 102 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 102 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 102], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:40:17 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/102/payments/new" for 127.0.0.1 at 2014-10-10 07:40:17 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"102"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "102"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 185 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 102 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (6.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 18.6ms (Views: 9.9ms | ActiveRecord: 2.4ms)  (0.6ms) ROLLBACK Connecting to database specified by database.yml  (0.5ms) BEGIN SQL (1.4ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.8ms) SAVEPOINT active_record_1 SQL (5.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 186) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 186) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 186], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 103 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 103 ORDER BY to_date DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 103], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 103 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 186 LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 103], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 103 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/103/payments/21" for 127.0.0.1 at 2014-10-10 07:41:28 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"103", "id"=>"21"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "103"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 103 AND "adherent_payments"."id" = 21 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 103 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (7.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (29.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 51.8ms (Views: 40.7ms | ActiveRecord: 7.1ms)  (0.8ms) ROLLBACK  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 187) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 187) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 187], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 104 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 104 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 104], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 104 LIMIT 1 Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 187 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 104], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 104 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/104/payments/22" for 127.0.0.1 at 2014-10-10 07:41:28 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"104", "id"=>"22"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "104"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 104 AND "adherent_payments"."id" = 22 LIMIT 1 Adherent::Reglement Load (1.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 104 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (12.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 21.1ms (Views: 11.9ms | ActiveRecord: 5.6ms)  (0.7ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 188) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 188) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 188], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 105 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 105 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 105], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/105/payments/new" for 127.0.0.1 at 2014-10-10 07:41:28 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"105"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "105"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 188 LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 105 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (21.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (25.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39.3ms (Views: 28.7ms | ActiveRecord: 2.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 189) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 189) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 189], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 106 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 106 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 106], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/106/payments/new" for 127.0.0.1 at 2014-10-10 07:41:28 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"106"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "106"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 189 LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 106 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (7.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 19.4ms (Views: 11.3ms | ActiveRecord: 2.3ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 190) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 190) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 190], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 107 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 107 ORDER BY to_date DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 107], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/107/payments/new" for 127.0.0.1 at 2014-10-10 07:41:28 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"107"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "107"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 190 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 107 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (7.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.5ms (Views: 10.1ms | ActiveRecord: 2.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 191) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 191) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 191], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 108 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 108 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 108], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/108/payments/new" for 127.0.0.1 at 2014-10-10 07:41:28 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"108"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 191 LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 108 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.3ms (Views: 13.1ms | ActiveRecord: 2.6ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 108 Started POST "/adherent/members/108/payments" for 127.0.0.1 at 2014-10-10 07:41:28 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"108"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 108 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 191 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 108], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 108 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/108/payments Completed 302 Found in 13.7ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/108/payments" for 127.0.0.1 at 2014-10-10 07:41:28 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"108"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 108 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 108 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 25.7ms (Views: 18.4ms | ActiveRecord: 5.1ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 108  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 192) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 192) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 192], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 109 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 109 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 109], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 109 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 192 LIMIT 1 SQL (1.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 109], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 109 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/109/payments" for 127.0.0.1 at 2014-10-10 07:41:28 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"109"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "109"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 109 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 109 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 17.8ms (Views: 11.4ms | ActiveRecord: 4.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 193) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 193) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 193], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 110 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 110 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 110], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 110 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 193 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 110], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:41:28 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 110 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/110/payments" for 127.0.0.1 at 2014-10-10 07:41:28 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"110"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "110"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 110 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 110 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 19.1ms (Views: 11.4ms | ActiveRecord: 4.5ms) Started GET "/adherent/payments/25/reglements/new" for 127.0.0.1 at 2014-10-10 07:41:29 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"25"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "25"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 110 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (9.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (13.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 32.9ms (Views: 15.9ms | ActiveRecord: 4.8ms)  (0.4ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN SQL (1.1ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (4.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 194) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 194) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 194], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 111 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 111 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 111], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 111 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 194 LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 111], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 111 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/111/payments" for 127.0.0.1 at 2014-10-10 07:44:19 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"111"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "111"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 111 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 111 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (25.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (3.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.1ms) Completed 200 OK in 47.2ms (Views: 38.4ms | ActiveRecord: 6.4ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 195) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 195) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 195], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 112 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 112 ORDER BY to_date DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 112], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 112 LIMIT 1 Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 195 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 112], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 112 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/112/payments" for 127.0.0.1 at 2014-10-10 07:44:19 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"112"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "112"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 112 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 27 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 27  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 27 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 27 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 27 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 112 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.1ms (Views: 11.4ms | ActiveRecord: 4.9ms) Started GET "/adherent/payments/27/reglements/new" for 127.0.0.1 at 2014-10-10 07:44:19 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"27"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "27"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 112 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 27  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 27 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 27 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 27 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (27.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (32.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 54.2ms (Views: 38.0ms | ActiveRecord: 5.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 196) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 196) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 196], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 113 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 113 ORDER BY to_date DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 113], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/113/payments/new" for 127.0.0.1 at 2014-10-10 07:44:19 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"113"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "113"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 196 LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 113 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (13.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25.6ms (Views: 17.7ms | ActiveRecord: 2.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 197) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 197) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 197], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 114 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 114 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 114], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/114/payments/new" for 127.0.0.1 at 2014-10-10 07:44:19 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"114"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 197 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 114 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (6.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 16.9ms (Views: 9.3ms | ActiveRecord: 2.6ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 114 Started POST "/adherent/members/114/payments" for 127.0.0.1 at 2014-10-10 07:44:19 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"114"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 114 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 197 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 114], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 114 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/114/payments Completed 302 Found in 18.6ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/114/payments" for 127.0.0.1 at 2014-10-10 07:44:19 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"114"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 114 Adherent::Reglement Load (1.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 28 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 28  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 28 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 28 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 28 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 114 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.7ms (Views: 11.4ms | ActiveRecord: 5.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 114  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 198) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 198) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 198], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 115 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 115 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 115], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/115/payments/new" for 127.0.0.1 at 2014-10-10 07:44:19 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"115"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "115"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 198 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 115 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (6.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.7ms (Views: 9.0ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 199) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 199) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 199], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 116 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 116 ORDER BY to_date DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 116], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/116/payments/new" for 127.0.0.1 at 2014-10-10 07:44:19 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"116"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "116"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 199 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 116 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (6.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.1ms (Views: 9.3ms | ActiveRecord: 2.3ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 200) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 200) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 200], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 117 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 117 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 117], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 117 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 200 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 117], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 117 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/117/payments/29" for 127.0.0.1 at 2014-10-10 07:44:19 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"117", "id"=>"29"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 117 AND "adherent_payments"."id" = 29 LIMIT 1 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 29  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 29 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 117 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 29 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 29 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 29 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (6.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (22.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31.0ms (Views: 22.2ms | ActiveRecord: 4.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 201) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 201) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 201], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 118 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 118 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 118], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 118 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 201 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 118], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:44:19 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 118 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/118/payments/30" for 127.0.0.1 at 2014-10-10 07:44:19 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"118", "id"=>"30"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "118"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 118 AND "adherent_payments"."id" = 30 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 30  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 30 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 118 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 30 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 30 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 30 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 21.9ms (Views: 12.9ms | ActiveRecord: 4.6ms)  (1.2ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN SQL (1.1ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (6.4ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 202) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 202) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 202], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 119 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 119 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 119], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/119/payments/new" for 127.0.0.1 at 2014-10-10 07:46:21 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"119"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "119"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 202 LIMIT 1 Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 119 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (24.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (31.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.5ms) Completed 200 OK in 111.6ms (Views: 86.3ms | ActiveRecord: 6.5ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 203) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 203) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 203], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 120 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 120 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 120], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/120/payments/new" for 127.0.0.1 at 2014-10-10 07:46:21 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"120"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 203 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 120 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 19.0ms (Views: 11.2ms | ActiveRecord: 2.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 204) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 204) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 204], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]]  (1.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 121 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 121 ORDER BY to_date DESC LIMIT 1  (0.7ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 121], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/121/payments/new" for 127.0.0.1 at 2014-10-10 07:46:21 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"121"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "121"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 204 LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 121 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (6.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 17.4ms (Views: 9.1ms | ActiveRecord: 2.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 205) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 205) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 205], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 122 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 122 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 122], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/122/payments/new" for 127.0.0.1 at 2014-10-10 07:46:21 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"122"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "122"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 205 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 122 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.7ms (Views: 11.0ms | ActiveRecord: 2.6ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 122 Started POST "/adherent/members/122/payments" for 127.0.0.1 at 2014-10-10 07:46:21 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"122"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "122"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 122 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 205 LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 122], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 122 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/122/payments Completed 302 Found in 20.6ms (ActiveRecord: 6.7ms) Started GET "/adherent/members/122/payments" for 127.0.0.1 at 2014-10-10 07:46:21 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"122"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "122"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 122 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 31 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 31  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 31 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 31 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 31 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 122 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (22.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 29.6ms (Views: 21.6ms | ActiveRecord: 5.9ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 122  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 206) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 206) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 206], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 123 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 123 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 123], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 123 LIMIT 1 Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 206 LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 123], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 123 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/123/payments" for 127.0.0.1 at 2014-10-10 07:46:21 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"123"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 123 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 32 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 32  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 32 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 32 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 32 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 123 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (59.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 65.9ms (Views: 58.0ms | ActiveRecord: 5.8ms)  (0.8ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 207) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 207) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 207], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 124 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 124 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 124], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 124 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 207 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 124], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:46:21 UTC +00:00]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 124 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/124/payments" for 127.0.0.1 at 2014-10-10 07:46:21 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"124"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "124"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 124 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 33 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 33  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 33 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 33 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 33 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 124 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 18.5ms (Views: 11.7ms | ActiveRecord: 4.7ms) Started GET "/adherent/payments/33/reglements/new" for 127.0.0.1 at 2014-10-10 07:46:21 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"33"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "33"]] Adherent::Member Load (1.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 124 LIMIT 1 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 33  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 33 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 33 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 33 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (14.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 36.9ms (Views: 16.7ms | ActiveRecord: 7.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 208) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 208) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 208], ["updated_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 125 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 125 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 125], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 125 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 208 LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 125], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 125 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/125/payments/34" for 127.0.0.1 at 2014-10-10 07:46:22 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"125", "id"=>"34"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "125"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 125 AND "adherent_payments"."id" = 34 LIMIT 1 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 34  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 34 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 125 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 34 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 34 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 34 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (21.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30.6ms (Views: 20.9ms | ActiveRecord: 5.4ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 209) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 209) LIMIT 1 SQL (2.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 209], ["updated_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 126 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 126 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 126], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 126 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 209 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 126], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 126 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/126/payments/35" for 127.0.0.1 at 2014-10-10 07:46:22 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"126", "id"=>"35"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "126"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 126 AND "adherent_payments"."id" = 35 LIMIT 1 Adherent::Reglement Load (1.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 35  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 35 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 126 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 35 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 35 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 35 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 21.3ms (Views: 12.6ms | ActiveRecord: 5.6ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN SQL (1.0ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 210) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 210) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 210], ["updated_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 127 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 127 ORDER BY to_date DESC LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 127], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 127 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 210 LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 127], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:46:22 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 127 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/127/payments/36" for 127.0.0.1 at 2014-10-10 07:46:22 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"127", "id"=>"36"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "127"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 127 AND "adherent_payments"."id" = 36 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 127 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 36 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23.7ms (Views: 14.4ms | ActiveRecord: 4.8ms)  (0.5ms) ROLLBACK Connecting to database specified by database.yml  (1.0ms) BEGIN SQL (1.1ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (5.3ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:46:53 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 211) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 211) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:46:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 211], ["updated_at", Fri, 10 Oct 2014 05:46:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 128 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 128 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 128], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 128 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 211 LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 128], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 128 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/128/payments" for 127.0.0.1 at 2014-10-10 07:46:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"128"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "128"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 128 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 128 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (23.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 45.1ms (Views: 36.8ms | ActiveRecord: 6.0ms)  (0.7ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 212) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 212) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 212], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 129 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 129 ORDER BY to_date DESC LIMIT 1  (1.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 129], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 129 LIMIT 1 Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 212 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 129], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 129 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/129/payments" for 127.0.0.1 at 2014-10-10 07:46:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"129"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "129"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 129 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 129 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.5ms (Views: 13.2ms | ActiveRecord: 4.9ms) Started GET "/adherent/payments/38/reglements/new" for 127.0.0.1 at 2014-10-10 07:46:54 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"38"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 129 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38 Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 38 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (23.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (27.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 46.8ms (Views: 29.7ms | ActiveRecord: 5.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 213) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 213) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 213], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 130 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 130 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 130], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/130/payments/new" for 127.0.0.1 at 2014-10-10 07:46:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"130"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "130"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 213 LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 130 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (12.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28.4ms (Views: 19.2ms | ActiveRecord: 2.7ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 130 Started POST "/adherent/members/130/payments" for 127.0.0.1 at 2014-10-10 07:46:54 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"130"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "130"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 130 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 213 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 130], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 130 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/130/payments Completed 302 Found in 12.7ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/130/payments" for 127.0.0.1 at 2014-10-10 07:46:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"130"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "130"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 130 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 39 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 130 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (52.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (56.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 62.5ms (Views: 56.6ms | ActiveRecord: 4.2ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 130  (0.6ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 214) LIMIT 1  (0.9ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 214) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 214], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 131 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 131 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 131], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/131/payments/new" for 127.0.0.1 at 2014-10-10 07:46:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"131"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "131"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 214 LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 131 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (7.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 19.2ms (Views: 9.4ms | ActiveRecord: 2.6ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 215) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 215) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 215], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 132 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 132 ORDER BY to_date DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 132], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 132 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 215 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 132], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 132 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/132/payments/40" for 127.0.0.1 at 2014-10-10 07:46:54 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"132", "id"=>"40"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 132 AND "adherent_payments"."id" = 40 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 132 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 40 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (6.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (21.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29.9ms (Views: 21.2ms | ActiveRecord: 4.9ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 216) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 216) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 216], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 133 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 133 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 133], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 133 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 216 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 133], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 133 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/133/payments/41" for 127.0.0.1 at 2014-10-10 07:46:54 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"133", "id"=>"41"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "133"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 133 AND "adherent_payments"."id" = 41 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 41  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 41 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 133 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 41 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 41 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 41 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 21.5ms (Views: 11.7ms | ActiveRecord: 4.9ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 217) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 217) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 217], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 134 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 134 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 134], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 134 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 217 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 134], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 134 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/134/payments/42" for 127.0.0.1 at 2014-10-10 07:46:54 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"134", "id"=>"42"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "134"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 134 AND "adherent_payments"."id" = 42 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 42  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 42 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 134 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 42 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 42 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 42 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 20.4ms (Views: 11.3ms | ActiveRecord: 5.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 218) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 218) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 218], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 135 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 135 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 135], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/135/payments/new" for 127.0.0.1 at 2014-10-10 07:46:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"135"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "135"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 218 LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 135 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.3ms (Views: 12.1ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 219) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 219) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 219], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 136 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 136 ORDER BY to_date DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 136], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/136/payments/new" for 127.0.0.1 at 2014-10-10 07:46:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"136"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "136"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 219 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 136 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 17.5ms (Views: 10.1ms | ActiveRecord: 2.6ms)  (0.4ms) ROLLBACK Connecting to database specified by database.yml  (0.5ms) BEGIN SQL (1.1ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (5.3ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:47:43 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:47:43 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 220) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 220) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:47:43 UTC +00:00], ["forname", "le prénom"], ["name", "NOM_0"], ["number", "Adh000"], ["organism_id", 220], ["updated_at", Fri, 10 Oct 2014 05:47:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 137 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 137 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:47:43 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 137], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:47:43 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 137 LIMIT 1 Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 220 LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:47:43 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 137], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:47:43 UTC +00:00]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 137 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/137/payments" for 127.0.0.1 at 2014-10-10 07:47:43 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"137"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "137"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 137 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 43 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 43  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 43 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 43 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 43 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 137 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (24.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.1ms) Completed 200 OK in 44.8ms (Views: 36.0ms | ActiveRecord: 6.5ms)  (0.8ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:47:43 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:47:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 221) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 221) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:47:43 UTC +00:00], ["forname", "le prénom"], ["name", "NOM_0"], ["number", "Adh000"], ["organism_id", 221], ["updated_at", Fri, 10 Oct 2014 05:47:43 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 138 Adherent::Adhesion Load (1.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 138 ORDER BY to_date DESC LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:47:43 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 138], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:47:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 138 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 221 LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:47:43 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 138], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:47:43 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 138 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/138/payments" for 127.0.0.1 at 2014-10-10 07:47:43 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"138"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "138"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 138 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 44 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 44  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 44 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 44 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 44 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 138 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.5ms (Views: 11.1ms | ActiveRecord: 5.3ms) Started GET "/adherent/payments/44/reglements/new" for 127.0.0.1 at 2014-10-10 07:47:43 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"44"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "44"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 138 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 44  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 44 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 44 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 44 Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (24.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (27.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 46.3ms (Views: 30.0ms | ActiveRecord: 5.0ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 222) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 222) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["forname", "le prénom"], ["name", "NOM_0"], ["number", "Adh000"], ["organism_id", 222], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 139 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 139 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 139], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/139/payments/new" for 127.0.0.1 at 2014-10-10 07:47:44 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"139"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "139"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 222 LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 139 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27.0ms (Views: 18.7ms | ActiveRecord: 2.5ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 139 Started POST "/adherent/members/139/payments" for 127.0.0.1 at 2014-10-10 07:47:44 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"139"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "139"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 139 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 222 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 139], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 139 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/139/payments Completed 302 Found in 13.8ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/139/payments" for 127.0.0.1 at 2014-10-10 07:47:44 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"139"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "139"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 139 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 45 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 45  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 45 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 45 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 45 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 139 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.9ms (Views: 11.5ms | ActiveRecord: 4.6ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 139  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (3.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 223) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 223) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["forname", "le prénom"], ["name", "NOM_0"], ["number", "Adh000"], ["organism_id", 223], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 140 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 140 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 140], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/140/payments/new" for 127.0.0.1 at 2014-10-10 07:47:44 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"140"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "140"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 223 LIMIT 1 Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 140 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (7.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 17.6ms (Views: 9.7ms | ActiveRecord: 2.8ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 224) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 224) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["forname", "le prénom"], ["name", "NOM_0"], ["number", "Adh000"], ["organism_id", 224], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 141 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 141 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 141], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 141 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 224 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 141], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 141 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/141/payments/46" for 127.0.0.1 at 2014-10-10 07:47:44 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"141", "id"=>"46"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "141"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 141 AND "adherent_payments"."id" = 46 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 46  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 46 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 141 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 46 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 46 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 46 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (7.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (21.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.3ms) Completed 200 OK in 31.6ms (Views: 21.5ms | ActiveRecord: 5.2ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 225) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 225) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["forname", "le prénom"], ["name", "NOM_0"], ["number", "Adh000"], ["organism_id", 225], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 142 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 142 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 142], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 142 LIMIT 1 Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 225 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 142], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 142 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/142/payments/47" for 127.0.0.1 at 2014-10-10 07:47:44 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"142", "id"=>"47"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "142"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 142 AND "adherent_payments"."id" = 47 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 47  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 47 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 142 LIMIT 1 Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 47 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 47 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 47 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (12.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.6ms (Views: 12.0ms | ActiveRecord: 5.4ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 226) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 226) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["forname", "le prénom"], ["name", "NOM_0"], ["number", "Adh000"], ["organism_id", 226], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 143 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 143 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 143], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 143 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 226 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 143], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 143 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/143/payments/48" for 127.0.0.1 at 2014-10-10 07:47:44 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"143", "id"=>"48"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "143"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 143 AND "adherent_payments"."id" = 48 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 48  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 48 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 143 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 48 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 48 Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 48 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (12.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22.2ms (Views: 12.2ms | ActiveRecord: 5.3ms)  (0.6ms) ROLLBACK  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 227) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 227) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["forname", "le prénom"], ["name", "NOM_0"], ["number", "Adh000"], ["organism_id", 227], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 144 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 144 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 144], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/144/payments/new" for 127.0.0.1 at 2014-10-10 07:47:44 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"144"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "144"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 227 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 144 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 18.3ms (Views: 10.7ms | ActiveRecord: 2.3ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 228) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 228) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["forname", "le prénom"], ["name", "NOM_0"], ["number", "Adh000"], ["organism_id", 228], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 145 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 145 ORDER BY to_date DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 145], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:47:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/145/payments/new" for 127.0.0.1 at 2014-10-10 07:47:44 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"145"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "145"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 228 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 145 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (6.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 16.0ms (Views: 8.4ms | ActiveRecord: 2.6ms)  (0.6ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN SQL (1.1ms) DELETE FROM "adherent_members" Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (6.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 229) LIMIT 1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 229) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 229], ["updated_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 146 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 146 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 146], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 146 LIMIT 1 Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 229 LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 146], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 146 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/146/payments/49" for 127.0.0.1 at 2014-10-10 07:49:00 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"146", "id"=>"49"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "146"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 146 AND "adherent_payments"."id" = 49 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 49  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 49 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 146 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 49 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 49 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 49 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (6.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (29.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 53.8ms (Views: 42.9ms | ActiveRecord: 6.7ms)  (0.8ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 230) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 230) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 230], ["updated_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 147 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 147 ORDER BY to_date DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 147], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 147 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 230 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 147], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 147 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/147/payments/50" for 127.0.0.1 at 2014-10-10 07:49:00 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"147", "id"=>"50"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "147"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 147 AND "adherent_payments"."id" = 50 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 50  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 50 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 147 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 50 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 50 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 50 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.1ms (Views: 11.2ms | ActiveRecord: 5.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 231) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 231) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 231], ["updated_at", Fri, 10 Oct 2014 05:49:00 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 148 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 148 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 148], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 148 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 231 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 148], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 148 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/148/payments/51" for 127.0.0.1 at 2014-10-10 07:49:01 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"148", "id"=>"51"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "148"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 148 AND "adherent_payments"."id" = 51 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 51  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 51 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 148 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 51 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 51 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 51 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 18.7ms (Views: 11.2ms | ActiveRecord: 4.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 232) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 232) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 232], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 149 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 149 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 149], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/149/payments/new" for 127.0.0.1 at 2014-10-10 07:49:01 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"149"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "149"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 232 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 149 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (22.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (26.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 38.0ms (Views: 29.4ms | ActiveRecord: 3.1ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 233) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 233) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 233], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 150 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 150 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 150], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/150/payments/new" for 127.0.0.1 at 2014-10-10 07:49:01 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"150"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "150"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 233 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 150 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (6.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.1ms (Views: 9.8ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 234) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 234) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 234], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 151 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 151 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 151], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/151/payments/new" for 127.0.0.1 at 2014-10-10 07:49:01 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"151"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "151"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 234 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 151 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (52.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (53.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 63.9ms (Views: 56.5ms | ActiveRecord: 2.8ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 235) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 235) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 235], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 152 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 152 ORDER BY to_date DESC LIMIT 1  (1.5ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 152], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]]  (1.9ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/152/payments/new" for 127.0.0.1 at 2014-10-10 07:49:01 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"152"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "152"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 235 LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 152 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (6.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.1ms (Views: 9.0ms | ActiveRecord: 2.7ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 152 Started POST "/adherent/members/152/payments" for 127.0.0.1 at 2014-10-10 07:49:01 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"152"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "152"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 152 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 235 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 152], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 152 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/152/payments Completed 302 Found in 13.4ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/152/payments" for 127.0.0.1 at 2014-10-10 07:49:01 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"152"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "152"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 152 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 52 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 52  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 52 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 52 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 52 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 152 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 25.0ms (Views: 18.4ms | ActiveRecord: 4.6ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 152  (0.5ms) ROLLBACK  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 236) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 236) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 236], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 153 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 153 ORDER BY to_date DESC LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 153], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 153 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 236 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 153], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 153 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/153/payments" for 127.0.0.1 at 2014-10-10 07:49:01 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"153"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "153"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 153 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 53 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 53  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 53 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 53 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 53 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 153 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 16.9ms (Views: 10.9ms | ActiveRecord: 4.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 237) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 237) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 237], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 154 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 154 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 154], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 154 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 237 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 154], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:01 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 154 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/154/payments" for 127.0.0.1 at 2014-10-10 07:49:01 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"154"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "154"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 154 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 54 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 54  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 54 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 54 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 54 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 154 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 17.6ms (Views: 11.0ms | ActiveRecord: 4.6ms) Started GET "/adherent/payments/54/reglements/new" for 127.0.0.1 at 2014-10-10 07:49:01 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"54"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "54"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 154 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 54  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 54 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 54 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 54 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (9.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (13.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31.9ms (Views: 16.1ms | ActiveRecord: 4.4ms)  (0.5ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"155"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 155 AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.7ms) UPDATE "adherent_members" SET "name" = 'Dalton', "updated_at" = '2014-10-10 05:49:53.557886' WHERE "adherent_members"."id" = 155  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/155 Completed 302 Found in 28.9ms (ActiveRecord: 7.1ms)  (0.8ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"156"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/156 Completed 302 Found in 5.8ms (ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"157"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/157 Completed 302 Found in 6.2ms (ActiveRecord: 2.2ms)  (0.1ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"158"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12.6ms (Views: 7.6ms | ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.2ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.7ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 16.0ms (Views: 1.5ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 245) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 245], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/159/coord/new Completed 302 Found in 23.3ms (ActiveRecord: 3.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 246) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 246], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/160/coord/new Completed 302 Found in 10.3ms (ActiveRecord: 3.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 247) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 247], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/161/coord/new Completed 302 Found in 10.6ms (ActiveRecord: 3.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.6ms (Views: 1.6ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.0ms (Views: 1.0ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.5ms (Views: 1.6ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 252 Completed 200 OK in 7.5ms (Views: 1.1ms | ActiveRecord: 2.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x625f764 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6.1ms (ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x6271464 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5.1ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.4ms) COMMIT  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 255) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 255) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 255], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 162 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 162 ORDER BY to_date DESC LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 162], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 162 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 255 LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 162], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:53 UTC +00:00]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 162 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/162/payments" for 127.0.0.1 at 2014-10-10 07:49:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"162"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "162"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 162 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 55 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 55  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 55 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 55 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 55 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 162 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.8ms) Completed 200 OK in 43.6ms (Views: 34.2ms | ActiveRecord: 7.1ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 256) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 256) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 256], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 163 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 163 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 163], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (1.5ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 163 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 256 LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 163], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 163 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/163/payments" for 127.0.0.1 at 2014-10-10 07:49:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"163"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "163"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 163 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 56 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 56  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 56 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 56 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 56 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 163 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.3ms (Views: 10.3ms | ActiveRecord: 4.3ms) Started GET "/adherent/payments/56/reglements/new" for 127.0.0.1 at 2014-10-10 07:49:54 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"56"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "56"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 163 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 56  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 56 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 56 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 56 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (22.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 45.5ms (Views: 29.1ms | ActiveRecord: 4.9ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 257) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 257) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 257], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 164 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 164 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 164], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 164 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 257 LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 164], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 164 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/164/payments/57" for 127.0.0.1 at 2014-10-10 07:49:54 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"164", "id"=>"57"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "164"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 164 AND "adherent_payments"."id" = 57 LIMIT 1 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 57  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 57 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 164 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 57 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 57 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 57 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (6.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 31.5ms (Views: 22.4ms | ActiveRecord: 5.3ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 258) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 258) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 258], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 165 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 165 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 165], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 165 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 258 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 165], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 165 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/165/payments/58" for 127.0.0.1 at 2014-10-10 07:49:54 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"165", "id"=>"58"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "165"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 165 AND "adherent_payments"."id" = 58 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 58  (2.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 58 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 165 LIMIT 1 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 58 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 58 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 58 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 70.7ms (Views: 59.1ms | ActiveRecord: 7.8ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 259) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 259) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 259], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 166 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 166 ORDER BY to_date DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 166], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 166 LIMIT 1 Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 259 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 166], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 166 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/166/payments/59" for 127.0.0.1 at 2014-10-10 07:49:54 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"166", "id"=>"59"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "166"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 166 AND "adherent_payments"."id" = 59 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 59  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 59 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 166 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 59 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 59 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 59 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.3ms (Views: 10.9ms | ActiveRecord: 5.3ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 260) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 260) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 260], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 167 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 167 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 167], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/167/payments/new" for 127.0.0.1 at 2014-10-10 07:49:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"167"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "167"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 260 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 167 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22.7ms (Views: 14.0ms | ActiveRecord: 2.5ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 167 Started POST "/adherent/members/167/payments" for 127.0.0.1 at 2014-10-10 07:49:54 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"167"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "167"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 167 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 260 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 167], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 167 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/167/payments Completed 302 Found in 13.6ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/167/payments" for 127.0.0.1 at 2014-10-10 07:49:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"167"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "167"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 167 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 60 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 60  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 60 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 60 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 60 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 167 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.2ms (Views: 10.6ms | ActiveRecord: 4.9ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 167  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 261) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 261) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 261], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 168 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 168 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 168], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/168/payments/new" for 127.0.0.1 at 2014-10-10 07:49:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"168"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "168"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 261 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 168 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.2ms (Views: 8.1ms | ActiveRecord: 2.6ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 262) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 262) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 262], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 169 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 169 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 169], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/169/payments/new" for 127.0.0.1 at 2014-10-10 07:49:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"169"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "169"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 262 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 169 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.8ms (Views: 7.8ms | ActiveRecord: 2.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 263) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 263) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 263], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 170 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 170 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 170], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/170/payments/new" for 127.0.0.1 at 2014-10-10 07:49:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"170"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "170"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 263 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 170 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.8ms (Views: 8.7ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 1], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 102  (0.4ms) SAVEPOINT active_record_1 SQL (2.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 102], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["payment_id", 1], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 102  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 1], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 103  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 103], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["payment_id", 1], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 103  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 103  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 1], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 104  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 104], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["payment_id", 1], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 264) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 264) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 264], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 264) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 264) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 264], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 171], ["to_date", Sat, 31 Aug 2013], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 172], ["to_date", Sat, 31 Aug 2013], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 172 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 264 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 172], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 172 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 106 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 106], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["payment_id", 61], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 265) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 265) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 265], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 265) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 265) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 265], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 173], ["to_date", Sat, 31 Aug 2013], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 174], ["to_date", Sat, 31 Aug 2013], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 174 LIMIT 1 Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 265 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 174], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 174 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 108 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 108], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["payment_id", 62], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 173 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 265 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 173], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 173 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 107 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 107], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["payment_id", 63], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 266) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 266) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 266], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 266) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 266) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 266], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 175], ["to_date", Sat, 31 Aug 2013], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 176], ["to_date", Sat, 31 Aug 2013], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 176 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 266 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 176], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 176 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 110 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 110], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["payment_id", 64], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 176 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 266 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 176], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 176 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 110 SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 110], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["payment_id", 65], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 175 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 266 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 175], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 175 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 109 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 109], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["payment_id", 66], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.4ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.7ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e7298a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.1ms (Views: 1.2ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e9ae44 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x5e9f6ba @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.4ms (Views: 1.9ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ec239a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.1ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ee717c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.3ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5f0cecc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5f0cecc%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5.4ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5f41cf8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (3.1ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5f41cf8%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 10.5ms (ActiveRecord: 5.1ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5f60284 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 274) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 274) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 274], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"   (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 177], ["to_date", Mon, 10 Nov 2014], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 177 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 177 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["from_date", Tue, 11 Nov 2014], ["member_id", 177], ["to_date", Tue, 10 Nov 2015], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 177 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 274 LIMIT 1  (0.4ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"   (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 275) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 275) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 275], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 178], ["to_date", Mon, 10 Nov 2014], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 178 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 178 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["from_date", Tue, 11 Nov 2014], ["member_id", 178], ["to_date", Tue, 10 Nov 2015], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 178 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 275 LIMIT 1  (0.4ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 276) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 276) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 276], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"   (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 179], ["to_date", Mon, 10 Nov 2014], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 179 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 179 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["from_date", Tue, 11 Nov 2014], ["member_id", 179], ["to_date", Tue, 10 Nov 2015], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 179 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 276 LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 179], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 179 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 115 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 115], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["payment_id", 67], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 277) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 277) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 277], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"   (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 180], ["to_date", Mon, 10 Nov 2014], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 180 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 180 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["from_date", Tue, 11 Nov 2014], ["member_id", 180], ["to_date", Tue, 10 Nov 2015], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 180 LIMIT 1 Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 277 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 180], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 180 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 117 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 117], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["payment_id", 68], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 118 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 118], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["payment_id", 68], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 68  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 68  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 278) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 278) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 278], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 181], ["to_date", Mon, 10 Nov 2014], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 181 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 181 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["from_date", Tue, 11 Nov 2014], ["member_id", 181], ["to_date", Tue, 10 Nov 2015], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 181 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 278 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 181], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 181 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 119 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 119], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["payment_id", 69], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 120 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 120], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["payment_id", 69], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"   (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" IS NULL  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 SQL (2.0ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", nil], ["city", "Lille"], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["gsm", nil], ["mail", nil], ["member_id", 182], ["office", nil], ["tel", nil], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["zip", 59000]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 182 LIMIT 1  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"   (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 6]] SQL (0.9ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 182]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" INNER JOIN "adherent_members" ON "adherent_payments"."member_id" = "adherent_members"."id" WHERE "adherent_members"."organism_id" = 279 Completed 200 OK in 14.8ms (Views: 2.1ms | ActiveRecord: 2.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 280) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 280) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 280], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 280) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 280) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 280], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 280) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 280) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 280], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 280) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 280) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 280], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 280) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 280) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 280], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:49:55 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 280  (0.6ms) SHOW max_identifier_length  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 183 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 183 LIMIT 1  (1.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 184 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 184 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 185 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 185 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 186 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 186 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 187 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 187 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 83.5ms (Views: 70.1ms | ActiveRecord: 10.8ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 281) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 281) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 281], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 281) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 281) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 281], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 281) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 281) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 281], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 281) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 281) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 281], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 281) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 281) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 281], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:49:55 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 281  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 188 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 188 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 189 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (1.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 189 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 190 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 190 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 191 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 191 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 192 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 192 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 100.0ms (Views: 86.9ms | ActiveRecord: 10.3ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 282) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 282) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 282], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 282) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 282) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 282], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 282) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 282) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 282], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 282) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 282) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 282], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 282) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 282) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 282], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members/new" for 127.0.0.1 at 2014-10-10 07:49:55 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (6.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14.0ms (Views: 11.5ms | ActiveRecord: 0.7ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members"  Started POST "/adherent/members" for 127.0.0.1 at 2014-10-10 07:49:55 +0200 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 282) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 282], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/198/coord/new Completed 302 Found in 7.2ms (ActiveRecord: 2.5ms) Started GET "/adherent/members/198/coord/new" for 127.0.0.1 at 2014-10-10 07:49:55 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"198"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "198"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 198 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.8ms (Views: 15.5ms | ActiveRecord: 1.8ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 283) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 283) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 283], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 283) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 283) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 283], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 283) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 283) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 283], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 283) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 283) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 283], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 283) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 283) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 283], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:49:55 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 283  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 199 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 199 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 200 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 200 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 201 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 201 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 202 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 202 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 203 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 203 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40.4ms (Views: 28.8ms | ActiveRecord: 9.2ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Started GET "/adherent/members/199/edit" for 127.0.0.1 at 2014-10-10 07:49:55 +0200 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"199"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "199"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (5.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 13.3ms (Views: 10.4ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 284) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 284) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 284], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 284) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 284) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 284], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 284) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 284) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 284], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 284) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 284) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 284], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 284) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 284) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 284], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:49:55 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 284  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 204 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 204 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 205 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 205 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 206 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 206 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 207 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 207 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 208 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 208 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39.3ms (Views: 27.7ms | ActiveRecord: 9.2ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 204 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 204 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 204], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/204/adhesions" for 127.0.0.1 at 2014-10-10 07:49:55 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"204"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "204"]]  (0.5ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 204 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 204  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 121 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 121 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.8ms (Views: 11.8ms | ActiveRecord: 2.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 285) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 285) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 285], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 285) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 285) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 285], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 285) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 285) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 285], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 285) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 285) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 285], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 285) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 285) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 285], ["updated_at", Fri, 10 Oct 2014 05:49:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:49:55 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 285  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 209 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 209 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 210 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 210 LIMIT 1  (1.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 211 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 211 LIMIT 1  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 212 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 212 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 213 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 213 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39.4ms (Views: 27.5ms | ActiveRecord: 9.6ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Started GET "/adherent/members/209/payments" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"209"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "209"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 209 Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 64.7ms (Views: 61.5ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 286) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 286) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 286], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 286) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 286) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 286], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 286) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 286) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 286], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 286) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 286) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 286], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 286) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 286) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 286], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 286  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 216 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 216 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 214 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 214 LIMIT 1  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 215 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 215 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 217 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 217 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 218 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 218 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40.9ms (Views: 29.4ms | ActiveRecord: 9.5ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", nil], ["city", "Marseille"], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["gsm", nil], ["mail", nil], ["member_id", 216], ["office", nil], ["tel", nil], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["zip", nil]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 216 LIMIT 1 Started GET "/adherent/members/216/coord" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"216"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "216"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 216 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 10.7ms (Views: 6.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 287) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 287) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 287], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 287) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 287) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 287], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 287) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 287) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 287], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 287) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 287) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 287], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 287) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 287) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 287], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 287  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 219 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 219 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 220 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 220 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 221 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 221 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 222 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 222 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 223 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 223 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39.3ms (Views: 27.9ms | ActiveRecord: 9.1ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Started GET "/adherent/members/219/adhesions" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"219"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "219"]]  (0.7ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 219 Redirected to http://www.example.com/adherent/members/219/adhesions/new Completed 302 Found in 5.0ms (ActiveRecord: 1.9ms) Started GET "/adherent/members/219/adhesions/new" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"219"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "219"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 219 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 219 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.1ms (Views: 12.2ms | ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 288) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 288) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 288], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 288) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 288) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 288], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 288) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 288) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 288], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 288) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 288) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 288], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 288) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 288) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 288], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 288  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 224 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 224 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 225 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 225 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 226 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 226 LIMIT 1  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 227 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 227 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 228 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 228 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40.3ms (Views: 29.4ms | ActiveRecord: 8.7ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Started GET "/adherent/members/224/coord" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"224"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "224"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 224 LIMIT 1 Redirected to http://www.example.com/adherent/members/224/coord/new Completed 302 Found in 4.8ms (ActiveRecord: 1.7ms) Started GET "/adherent/members/224/coord/new" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"224"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "224"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 224 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.5ms (Views: 10.4ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 289) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 289) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 289], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 289) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 289) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 289], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 289) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 289) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 289], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 289) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 289) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 289], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 289) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 289) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 289], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 289  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 229 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 229 LIMIT 1  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 230 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 230 LIMIT 1  (1.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 231 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 231 LIMIT 1  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 232 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 232 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 233 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 233 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40.4ms (Views: 27.4ms | ActiveRecord: 9.9ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (5.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 11.9ms (Views: 9.1ms | ActiveRecord: 0.7ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 290) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 290) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 290], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 290) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 290) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 290], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 290) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 290) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 290], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 234 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 234 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 234], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/234/payments/new" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"234"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "234"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 290 LIMIT 1 Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 234 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 122 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.6ms) Completed 200 OK in 90.4ms (Views: 80.3ms | ActiveRecord: 4.4ms) Started POST "/adherent/members/234/payments" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"234"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "234"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 234 LIMIT 1 Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 290 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 234], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 234 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 122 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 122], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["payment_id", 70], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/234/payments Completed 302 Found in 17.3ms (ActiveRecord: 6.4ms) Started GET "/adherent/members/234/payments" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"234"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "234"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 234 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 70 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 122 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 234 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 70  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 70 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 70 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 70 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 234 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30.7ms (Views: 23.2ms | ActiveRecord: 5.7ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 234 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 70  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 70  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 291) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 291) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 291], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 291) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 291) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 291], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 291) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 291) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 291], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 237 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 237 ORDER BY to_date DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 237], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/237/payments/new" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"237"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "237"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 291 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 237 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 123 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.3ms (Views: 8.5ms | ActiveRecord: 3.8ms) Started POST "/adherent/members/237/payments" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"237"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "237"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 237 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 291 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 237], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 237 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 123 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 123], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["payment_id", 71], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/237/payments Completed 302 Found in 18.6ms (ActiveRecord: 6.2ms) Started GET "/adherent/members/237/payments" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"237"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "237"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 237 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 71 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 123 LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 237 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 71  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 71 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 71 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 71 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 237 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.5ms (Views: 12.5ms | ActiveRecord: 5.1ms)  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 237 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 292) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 292) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 292], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 292) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 292) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 292], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 292) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 292) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 292], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 240 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 240 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 240], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/240/payments/new" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"240"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "240"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 292 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 240 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 124 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.5ms (Views: 8.0ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/240/payments" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"240"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "240"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 240 LIMIT 1 Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 292 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 240], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 240 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 124 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 124], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["payment_id", 72], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/240/payments Completed 302 Found in 17.1ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/240/payments" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"240"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "240"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 240 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 72 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 124 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 240 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 72  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 72 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 72 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 72 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 240 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.1ms (Views: 12.5ms | ActiveRecord: 4.9ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 240 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 241 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 241 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 241], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 242 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 242 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 242], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/72/reglements/new" for 127.0.0.1 at 2014-10-10 07:49:56 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"72"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "72"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 240 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 72  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 72 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 72 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 72 Adherent::Adhesion Load (2.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 242 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 126 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 241 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 125 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30.6ms (Views: 18.5ms | ActiveRecord: 7.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 293) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 293) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 293], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 293) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 293) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 293], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 293) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 293) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 293], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (1.9ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 243 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 243 ORDER BY to_date DESC LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 243], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/243/payments/new" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"243"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "243"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 293 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 243 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 127 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.7ms (Views: 8.9ms | ActiveRecord: 3.7ms) Started POST "/adherent/members/243/payments" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"243"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "243"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 243 LIMIT 1 Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 293 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 243], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 243 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 127 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 127], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["payment_id", 73], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/243/payments Completed 302 Found in 17.6ms (ActiveRecord: 6.2ms) Started GET "/adherent/members/243/payments" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"243"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "243"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 243 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 73 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 127 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 243 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 73  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 73 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 73 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 73 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 243 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 20.7ms (Views: 13.4ms | ActiveRecord: 4.9ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 243 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 244 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 244 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 244], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 245 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 245 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 245], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/73/reglements/new" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"73"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "73"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 243 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 73  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 73 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 73 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 73 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 245 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 129 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 244 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 128 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25.3ms (Views: 14.2ms | ActiveRecord: 6.8ms)  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 294) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 294) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 294], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 294) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 294) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 294], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 294) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 294) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 294], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 246 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 246 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 246], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/246/payments/new" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"246"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "246"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 294 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 246 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 130 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.9ms (Views: 7.9ms | ActiveRecord: 3.2ms) Started POST "/adherent/members/246/payments" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"246"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "246"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 246 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 294 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 246], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 246 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 130 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 130], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["payment_id", 74], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/246/payments Completed 302 Found in 17.3ms (ActiveRecord: 6.3ms) Started GET "/adherent/members/246/payments" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"246"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "246"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 246 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 74 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 130 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 246 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 74  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 74 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 74 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 74 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 246 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.6ms (Views: 12.7ms | ActiveRecord: 5.2ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 246 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 247 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 247 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 247], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 248 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 248 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 248], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/74/reglements/new" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"74"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "74"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 246 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 74  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 74 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 74 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 74 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 248 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 132 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 247 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 131 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26.0ms (Views: 14.6ms | ActiveRecord: 6.8ms) Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 246 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 246 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 74  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 74  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 295) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 295) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 295], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 295) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 295) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 295], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 295) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 295) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 295], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 249 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 249 ORDER BY to_date DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 249], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/249/payments/new" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"249"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "249"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 295 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 249 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 133 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.6ms (Views: 9.0ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/249/payments" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"249"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "249"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 249 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 295 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 249], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 249 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 133 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 133], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["payment_id", 75], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/249/payments Completed 302 Found in 17.6ms (ActiveRecord: 6.2ms) Started GET "/adherent/members/249/payments" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"249"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "249"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 249 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 75 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 133 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 249 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 75  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 75 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 75 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 75 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 249 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.7ms (Views: 13.7ms | ActiveRecord: 5.3ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 249 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 250 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 250 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 250], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 251 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 251 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 251], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/75/reglements/new" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"75"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "75"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 249 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 75  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 75 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 75 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 75 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 251 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 135 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 250 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 134 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 25.1ms (Views: 13.4ms | ActiveRecord: 7.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 296) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 296) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 296], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 296) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 296) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 296], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 296) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 296) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 296], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 252 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 252 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 252], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/252/payments/new" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"252"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "252"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 296 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 252 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 136 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.2ms (Views: 8.8ms | ActiveRecord: 3.7ms) Started POST "/adherent/members/252/payments" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"252"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "252"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (4.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 252 LIMIT 1 Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 296 LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 252], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 252 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 136 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 136], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["payment_id", 76], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/252/payments Completed 302 Found in 76.7ms (ActiveRecord: 11.6ms) Started GET "/adherent/members/252/payments" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"252"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "252"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 252 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 76 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 136 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 252 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 76  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 76 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 76 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 76 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 252 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.4ms (Views: 13.4ms | ActiveRecord: 5.3ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 252 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 253 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 253 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 253], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 254 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 254 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 254], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/76/reglements/new" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"76"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "76"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 252 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 76  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 76 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 76 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 76 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 253 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 137 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 254 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 138 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25.0ms (Views: 14.4ms | ActiveRecord: 6.5ms) Started POST "/adherent/payments/76/reglements" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"137"}, "commit"=>"Enregistrer", "payment_id"=>"76"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "76"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "137"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 76  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 76  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 137  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 137], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["payment_id", 76], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 252 LIMIT 1 Redirected to http://www.example.com/adherent/members/252/payments Completed 302 Found in 14.3ms (ActiveRecord: 5.9ms) Started GET "/adherent/members/252/payments" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"252"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "252"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 252 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 76 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 136 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 252 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 137 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 253 LIMIT 1 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 76  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 76 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 76 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 76 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 252 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24.2ms (Views: 15.4ms | ActiveRecord: 7.1ms) Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 253 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 137  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 297) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 297) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 297], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 297) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 297) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 297], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 297) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 297) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 297], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 255 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 255 ORDER BY to_date DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 255], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/255/payments/new" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"255"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "255"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 297 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 255 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 139 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.7ms (Views: 8.9ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/255/payments" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"255"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "255"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 255 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 297 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 255], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 255 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 139 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 139], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["payment_id", 77], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/255/payments Completed 302 Found in 17.7ms (ActiveRecord: 6.7ms) Started GET "/adherent/members/255/payments" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"255"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "255"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 255 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 77 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 139 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 255 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 77  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 77 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 77 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 77 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 255 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.5ms (Views: 13.6ms | ActiveRecord: 4.9ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 255 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 256 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 256 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 256], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 257 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 257 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 257], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/77/reglements/new" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"77"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "77"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 255 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 77  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 77 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 77 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 77 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 257 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 141 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 256 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 140 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25.4ms (Views: 14.6ms | ActiveRecord: 6.3ms) Started POST "/adherent/payments/77/reglements" for 127.0.0.1 at 2014-10-10 07:49:57 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"140"}, "commit"=>"Enregistrer", "payment_id"=>"77"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "77"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "140"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 77  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 77  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 140  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 140], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["payment_id", 77], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 255 LIMIT 1 Redirected to http://www.example.com/adherent/members/255/payments Completed 302 Found in 13.0ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/255/payments" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"255"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "255"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 255 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 77 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 139 LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 255 LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 140 LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 256 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 77  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 77 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 77 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 77 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 255 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24.1ms (Views: 15.6ms | ActiveRecord: 7.0ms) Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 140 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 256 LIMIT 1  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 298) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 298) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 298], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 298) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 298) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 298], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 298) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 298) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 298], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 258 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 258 ORDER BY to_date DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 258], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/258/payments/new" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"258"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "258"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 298 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 258 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 142 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.3ms (Views: 8.1ms | ActiveRecord: 4.3ms) Started POST "/adherent/members/258/payments" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"258"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "258"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 258 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 298 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 258], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 258 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 142 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 142], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["payment_id", 78], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/258/payments Completed 302 Found in 16.7ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/258/payments" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"258"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "258"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 258 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 78 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 142 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 258 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 78  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 78 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 78 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 78 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 258 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 20.1ms (Views: 13.1ms | ActiveRecord: 5.4ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 258 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 259 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 259 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 259], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 260 Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 260 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 260], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/78/reglements/new" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"78"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "78"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 258 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 78  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 78 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 78 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 78 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 259 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 143 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 260 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 144 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27.4ms (Views: 15.1ms | ActiveRecord: 7.2ms) Started POST "/adherent/payments/78/reglements" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"143"}, "commit"=>"Enregistrer", "payment_id"=>"78"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "78"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "143"]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 78  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 78  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 143  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 143], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["payment_id", 78], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 258 LIMIT 1 Redirected to http://www.example.com/adherent/members/258/payments Completed 302 Found in 13.8ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/258/payments" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"258"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "258"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 258 Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 78 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 142 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 258 LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 143 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 259 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 78  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 78 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 78 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 78 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 258 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24.6ms (Views: 16.0ms | ActiveRecord: 6.9ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 299) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 299) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 299], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 299) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 299) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 299], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 299) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 299) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 299], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 261 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 261 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 261], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/261/payments/new" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"261"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "261"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 299 LIMIT 1 Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 261 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 145 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.1ms (Views: 9.4ms | ActiveRecord: 4.1ms) Started POST "/adherent/members/261/payments" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"261"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "261"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 261 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 299 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 261], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 261 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 145 SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 145], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["payment_id", 79], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/261/payments Completed 302 Found in 22.2ms (ActiveRecord: 7.2ms) Started GET "/adherent/members/261/payments" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"261"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "261"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 261 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 79 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 145 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 261 LIMIT 1 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 79  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 79 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 79 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 79 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 261 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23.1ms (Views: 15.2ms | ActiveRecord: 5.7ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 261 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 262 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 262 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 262], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 263 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 263 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 263], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/79/reglements/new" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"79"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "79"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 261 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 79  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 79 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 79 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 79 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 262 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 146 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 263 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 147 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24.3ms (Views: 13.7ms | ActiveRecord: 6.1ms) Started POST "/adherent/payments/79/reglements" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"146"}, "commit"=>"Enregistrer", "payment_id"=>"79"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "79"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "146"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 79  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 79  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 146  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 146], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["payment_id", 79], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 261 LIMIT 1 Redirected to http://www.example.com/adherent/members/261/payments Completed 302 Found in 13.9ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/261/payments" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"261"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "261"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 261 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 79 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 145 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 261 LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 146 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 262 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 79  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 79 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 79 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 79 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 261 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 24.7ms (Views: 16.4ms | ActiveRecord: 6.5ms) Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 145 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 261 LIMIT 1  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 300) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 300) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 300], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 300) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 300) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 300], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 300) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 300) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 300], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 264 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 264 ORDER BY to_date DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 264], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/264/payments/new" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"264"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "264"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 300 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 264 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 148 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.2ms (Views: 8.3ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/264/payments" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"264"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "264"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 264 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 300 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 264], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 264 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 148 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 148], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["payment_id", 80], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/264/payments Completed 302 Found in 18.1ms (ActiveRecord: 6.0ms) Started GET "/adherent/members/264/payments" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"264"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "264"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 264 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 80 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 148 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 264 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 80  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 80 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 80 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 80 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 264 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.8ms (Views: 13.8ms | ActiveRecord: 4.9ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 264 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 265 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 265 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 265], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 266 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 266 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 266], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/80/reglements/new" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"80"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "80"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 264 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 80  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 80 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 80 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 80 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 265 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 149 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 266 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 150 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25.2ms (Views: 13.9ms | ActiveRecord: 6.5ms) Started POST "/adherent/payments/80/reglements" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"149"}, "commit"=>"Enregistrer", "payment_id"=>"80"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "80"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "149"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 80  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 80  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 149  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 149], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["payment_id", 80], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 264 LIMIT 1 Redirected to http://www.example.com/adherent/members/264/payments Completed 302 Found in 13.2ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/264/payments" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"264"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "264"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 264 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 80 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 148 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 264 LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 149 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 265 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 80  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 80 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 80 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 80 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 264 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23.1ms (Views: 15.1ms | ActiveRecord: 6.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 301) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 301) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 301], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 301) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 301) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 301], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 301) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 301) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 301], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 267 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 267 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 267], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 267 Started GET "/adherent/members/267/payments/new" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"267"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "267"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 301 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 267 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 151 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 77.1ms (Views: 67.5ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/267/payments" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"267"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "267"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 267 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 301 LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 267], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 267 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 151 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 151], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["payment_id", 81], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/267/payments Completed 302 Found in 18.0ms (ActiveRecord: 6.6ms) Started GET "/adherent/members/267/payments" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"267"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "267"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 267 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 81 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 151 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 267 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 81  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 81 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 81 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 81 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 267 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.3ms (Views: 12.4ms | ActiveRecord: 5.1ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 267  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 302) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 302) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 302], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 302) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 302) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 302], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 302) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 302) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 302], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 270 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 270 ORDER BY to_date DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 270], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/270/payments/new" for 127.0.0.1 at 2014-10-10 07:49:58 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"270"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "270"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 302 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 270 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 152 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.9ms (Views: 9.1ms | ActiveRecord: 3.2ms) Started POST "/adherent/members/270/payments" for 127.0.0.1 at 2014-10-10 07:49:59 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"270"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "270"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 270 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 302 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 270], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 270 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 152 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 152], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["payment_id", 82], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/270/payments Completed 302 Found in 18.0ms (ActiveRecord: 6.2ms) Started GET "/adherent/members/270/payments" for 127.0.0.1 at 2014-10-10 07:49:59 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"270"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "270"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 270 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 82 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 152 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 270 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 82  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 82 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 82 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 82 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 270 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.1ms (Views: 13.7ms | ActiveRecord: 5.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements"   (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 303) LIMIT 1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 303) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 303], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 303) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 303) LIMIT 1 SQL (3.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 303], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 303) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 303) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 303], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 273 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 273 ORDER BY to_date DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 273], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/273/payments/new" for 127.0.0.1 at 2014-10-10 07:49:59 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"273"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "273"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 303 LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 273 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 153 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.6ms (Views: 9.7ms | ActiveRecord: 3.6ms) Started POST "/adherent/members/273/payments" for 127.0.0.1 at 2014-10-10 07:49:59 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"273"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "273"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 273 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 303 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 273], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 273 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 153 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 153], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["payment_id", 83], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/273/payments Completed 302 Found in 18.8ms (ActiveRecord: 6.3ms) Started GET "/adherent/members/273/payments" for 127.0.0.1 at 2014-10-10 07:49:59 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"273"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "273"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 273 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 83 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 153 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 273 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 83  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 83 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 83 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 83 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 273 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.1ms (Views: 13.1ms | ActiveRecord: 5.3ms)  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 273 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 304) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 304) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 304], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 304) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 304) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 304], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 304) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 304) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 304], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 276 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 276 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 276], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/276/payments/new" for 127.0.0.1 at 2014-10-10 07:49:59 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"276"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "276"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 304 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 276 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 154 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.4ms (Views: 9.1ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/276/payments" for 127.0.0.1 at 2014-10-10 07:49:59 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"276"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "276"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 276 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 304 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 276], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 276 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 154 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 154], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["payment_id", 84], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/276/payments Completed 302 Found in 17.5ms (ActiveRecord: 5.7ms) Started GET "/adherent/members/276/payments" for 127.0.0.1 at 2014-10-10 07:49:59 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"276"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "276"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 276 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 84 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 154 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 276 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 84  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 84 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 84 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 84 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 276 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 18.6ms (Views: 11.8ms | ActiveRecord: 5.1ms) Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 276 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (1.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 154  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 305) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 305) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 305], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 305) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 305) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 305], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 305) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 305) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 305], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 279 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 279 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 279], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/279/payments/new" for 127.0.0.1 at 2014-10-10 07:49:59 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"279"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "279"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 305 LIMIT 1 Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 279 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 155 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 18.9ms (Views: 7.9ms | ActiveRecord: 4.2ms) Started POST "/adherent/members/279/payments" for 127.0.0.1 at 2014-10-10 07:49:59 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"279"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "279"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 279 LIMIT 1 Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 305 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 279], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 279 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 155 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 155], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["payment_id", 85], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/279/payments Completed 302 Found in 18.2ms (ActiveRecord: 6.4ms) Started GET "/adherent/members/279/payments" for 127.0.0.1 at 2014-10-10 07:49:59 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"279"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "279"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 279 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 85 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 155 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 279 LIMIT 1 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 85  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 85 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 85 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 85 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 279 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.9ms (Views: 13.5ms | ActiveRecord: 5.7ms)  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 279 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) ROLLBACK SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 306) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 306) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 306], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 306) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 306) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 306], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 306) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 306) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 306], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 306) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 306) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 306], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 306) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 306) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 306], ["updated_at", Fri, 10 Oct 2014 05:49:59 UTC +00:00]]  (2.1ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:50:03 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 306  (0.2ms) SHOW max_identifier_length  (1.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 282 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 282 LIMIT 1  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 283 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 283 LIMIT 1  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 284 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 284 LIMIT 1  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 285 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 285 LIMIT 1  (1.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 286 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 286 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 76.4ms (Views: 41.6ms | ActiveRecord: 29.7ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2014-10-10 07:50:03 +0200 Compiled jquery-ui/theme.css (53ms) (pid 8529) Compiled jquery-ui/core.css (60ms) (pid 8529) Compiled jquery-ui/datepicker.css (78ms) (pid 8529) Compiled adherent/adhesion.css (0ms) (pid 8529) Compiled adherent/allpayments.css (0ms) (pid 8529) Compiled adherent/bootstrap.css (0ms) (pid 8529) Compiled adherent/coords.css (0ms) (pid 8529) Compiled adherent/date_picker.css (0ms) (pid 8529) Compiled adherent/demo_table.css (0ms) (pid 8529) Compiled adherent/jc_application.css (256ms) (pid 8529) Compiled adherent/jcmenu.css (0ms) (pid 8529) Compiled adherent/layouts.css (10ms) (pid 8529) Compiled adherent/members.css (0ms) (pid 8529) Compiled adherent/old_bootstrap.css (0ms) (pid 8529) Compiled adherent/payments.css (0ms) (pid 8529) Compiled adherent/print.css (5ms) (pid 8529) Compiled adherent/reglements.css (0ms) (pid 8529) Compiled adherent/application.css (456ms) (pid 8529) Served asset /adherent/application.css - 200 OK (522ms) Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2014-10-10 07:50:04 +0200 Compiled jquery.js (7ms) (pid 8529) Compiled jquery_ujs.js (53ms) (pid 8529) Compiled jquery-ui/core.js (0ms) (pid 8529) Compiled jquery-ui/datepicker.js (5ms) (pid 8529) Compiled adherent/adhesion.js (0ms) (pid 8529) Compiled adherent/allpayments.js (0ms) (pid 8529) Compiled adherent/bootstrap.js (1ms) (pid 8529) Compiled adherent/coords.js (0ms) (pid 8529) Compiled adherent/date_picker.js (0ms) (pid 8529) Compiled adherent/jquery.dataTables.min.js (1ms) (pid 8529) Compiled adherent/members.js (0ms) (pid 8529) Compiled adherent/payments.js (0ms) (pid 8529) Compiled adherent/reglements.js (0ms) (pid 8529) Compiled adherent/application.js (120ms) (pid 8529) Served asset /adherent/application.js - 200 OK (138ms) Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2014-10-10 07:50:04 +0200 Served asset /adherent/icones/nouveau.png - 200 OK (5ms) Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2014-10-10 07:50:04 +0200 Served asset /adherent/icones/payment.png - 200 OK (3ms) Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2014-10-10 07:50:04 +0200 Served asset /adherent/icones/supprimer.png - 200 OK (10ms) Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2014-10-10 07:50:04 +0200 Served asset /adherent/icones/card-address.png - 200 OK (4ms) Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2014-10-10 07:50:04 +0200 Served asset /adherent/icones/bandaid.png - 200 OK (3ms) Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2014-10-10 07:50:04 +0200 Served asset /adherent/icones/modifier.png - 200 OK (3ms) Started GET "/assets/images/sort_asc.png" for 127.0.0.1 at 2014-10-10 07:50:04 +0200 Served asset /images/sort_asc.png - 200 OK (12ms) Started GET "/assets/images/forward_disabled.png" for 127.0.0.1 at 2014-10-10 07:50:04 +0200 Served asset /images/forward_disabled.png - 200 OK (8ms) Started GET "/assets/images/back_disabled.png" for 127.0.0.1 at 2014-10-10 07:50:04 +0200 Served asset /images/back_disabled.png - 200 OK (3ms) Started GET "/assets/images/sort_both.png" for 127.0.0.1 at 2014-10-10 07:50:04 +0200 Served asset /images/sort_both.png - 200 OK (2ms) Started DELETE "/adherent/members/282" for 127.0.0.1 at 2014-10-10 07:50:05 +0200 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"282"} Organism Load (6.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "282"]]  (0.3ms) BEGIN Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 282 LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 282]]  (68.7ms) COMMIT Redirected to http://127.0.0.1:43162/adherent/members Completed 302 Found in 86.2ms (ActiveRecord: 79.0ms) Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:50:05 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 306  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 283 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 283 LIMIT 1  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 284 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 284 LIMIT 1  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 285 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 285 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 286 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 286 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 36.2ms (Views: 26.4ms | ActiveRecord: 7.1ms)  (1.1ms) SELECT COUNT(*) FROM "adherent_members"   (1.0ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (1.7ms) select table_name from information_schema.views where table_schema = 'adh_test'  (107.4ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "organisms", "adherent_members", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (1.2ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (0.9ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:06 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:06 UTC +00:00]]  (2.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:50:06 UTC +00:00]]  (1.0ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:50:06 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:50:06 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:50:06 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:50:06 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1 ORDER BY to_date DESC LIMIT 1  (0.3ms) BEGIN SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:50:06 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 1], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:50:06 UTC +00:00]]  (2.1ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2014-10-10 07:50:06 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.8ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 1 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22.9ms (Views: 13.7ms | ActiveRecord: 6.5ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2014-10-10 07:50:06 +0200 Served asset /adherent/icones/users.png - 200 OK (3ms) Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2014-10-10 07:50:07 +0200 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (5.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1 AND "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "1"]]  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (110.9ms) COMMIT Redirected to http://127.0.0.1:43162/adherent/members/1/adhesions Completed 302 Found in 126.5ms (ActiveRecord: 117.9ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2014-10-10 07:50:07 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1 Redirected to http://127.0.0.1:43162/adherent/members/1/adhesions/new Completed 302 Found in 5.7ms (ActiveRecord: 2.5ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2014-10-10 07:50:07 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.3ms (Views: 12.6ms | ActiveRecord: 2.5ms) Started GET "/assets/adherent/cal.gif" for 127.0.0.1 at 2014-10-10 07:50:07 +0200 Served asset /adherent/cal.gif - 200 OK (3ms)  (2.2ms) SELECT COUNT(*) FROM "adherent_adhesions"   (2.6ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (115.9ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "organisms", "adherent_members", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (0.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:08 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:08 UTC +00:00]]  (2.3ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:50:08 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:50:08 UTC +00:00]]  (1.0ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:50:08 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:50:08 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:50:08 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"   (0.3ms) BEGIN Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 1 LIMIT 1 Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 1 LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:50:08 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Fri, 10 Oct 2014 05:50:08 UTC +00:00]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (1.2ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2014-10-10 07:50:08 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 1 AND "adherent_payments"."id" = 1 LIMIT 1 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 1 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (6.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35.2ms (Views: 23.6ms | ActiveRecord: 7.4ms) Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2014-10-10 07:50:08 +0200 Served asset /adherent/icones/money-plus.png - 200 OK (36ms) Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2014-10-10 07:50:08 +0200 Served asset /adherent/icones/imputation.png - 200 OK (3ms) Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2014-10-10 07:50:08 +0200 Served asset /adherent/icones/printer.png - 200 OK (3ms) Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2014-10-10 07:50:08 +0200 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (3.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 1 AND "adherent_payments"."id" = $1 LIMIT 1 [["id", "1"]]  (0.1ms) BEGIN Adherent::Reglement Load (4.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 SQL (4.4ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (136.2ms) COMMIT Redirected to http://127.0.0.1:43162/adherent/members/1/payments Completed 302 Found in 159.3ms (ActiveRecord: 150.3ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2014-10-10 07:50:08 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 1 Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 9.0ms (Views: 5.1ms | ActiveRecord: 2.0ms)  (1.8ms) SELECT COUNT(*) FROM "adherent_payments"   (2.1ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (95.6ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "organisms", "adherent_members", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (1.0ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL  (1.5ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.0ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 1], ["to_date", Mon, 10 Nov 2014], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2014-10-10 07:50:10 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.8ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 1 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.1ms (Views: 8.6ms | ActiveRecord: 3.6ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members"   (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 2], ["to_date", Mon, 10 Nov 2014], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/2/adhesions" for 127.0.0.1 at 2014-10-10 07:50:10 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"2"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]]  (0.5ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 2 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 2  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 2 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 2 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13.2ms (Views: 7.8ms | ActiveRecord: 3.1ms) Started GET "/adherent/members/2/payments/new" for 127.0.0.1 at 2014-10-10 07:50:10 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"2"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 2 LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 2 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 2 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 65.7ms (Views: 9.6ms | ActiveRecord: 3.4ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"   (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 3], ["to_date", Mon, 10 Nov 2014], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/3/adhesions" for 127.0.0.1 at 2014-10-10 07:50:10 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"3"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]]  (0.8ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 3 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 3  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 3 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 3 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14.4ms (Views: 8.0ms | ActiveRecord: 3.7ms) Started GET "/adherent/members/3/adhesions/3/edit" for 127.0.0.1 at 2014-10-10 07:50:10 +0200 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"3", "id"=>"3"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 3 AND "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "3"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (6.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.8ms (Views: 12.3ms | ActiveRecord: 2.1ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (2.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members/4/adhesions/new" for 127.0.0.1 at 2014-10-10 07:50:10 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"4"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 4 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 4 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (4.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.4ms (Views: 8.2ms | ActiveRecord: 2.3ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 4 Started POST "/adherent/members/4/adhesions" for 127.0.0.1 at 2014-10-10 07:50:10 +0200 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"4"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 4], ["to_date", Thu, 31 Jul 2014], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/4/adhesions Completed 302 Found in 10.3ms (ActiveRecord: 3.5ms) Started GET "/adherent/members/4/adhesions" for 127.0.0.1 at 2014-10-10 07:50:10 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]]  (0.5ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 4 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 4  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 4 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 4 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14.1ms (Views: 8.3ms | ActiveRecord: 3.1ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 4 SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 5], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members/5/adhesions/new" for 127.0.0.1 at 2014-10-10 07:50:10 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"5"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 5 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 5 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (5.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.3ms (Views: 8.4ms | ActiveRecord: 2.7ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x61e41e0 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x61e4212%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5.8ms (ActiveRecord: 2.1ms)  (0.6ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x621697e @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.6ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x6232944 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.5ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6252a28 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6252a28%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6.1ms (ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6271338 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8.7ms (Views: 2.0ms | ActiveRecord: 2.5ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x629680e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x629680e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6.0ms (ActiveRecord: 2.0ms)  (0.1ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x62ab72c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x62dd074 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.9ms (Views: 2.2ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x6307c5c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6307c5c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5.7ms (ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x631a50a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.4ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x63309fe @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.2ms | ActiveRecord: 1.8ms)  (0.7ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x634d36a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.1ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6361b94 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.2ms (Views: 1.6ms | ActiveRecord: 2.6ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x637b92c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" IS NULL ORDER BY to_date DESC LIMIT 1  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" IS NULL ORDER BY to_date DESC LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" IS NULL ORDER BY to_date DESC LIMIT 1  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 6 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 6 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 6], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 6 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 6 ORDER BY to_date DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 7 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 7 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 7], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 7 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 7 ORDER BY to_date DESC LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 8 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 8 ORDER BY to_date DESC LIMIT 1  (1.0ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 8], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 8 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 8 ORDER BY to_date DESC LIMIT 1  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.5ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x63d42ca @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x63d42ca%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6.3ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x63bb734 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.4ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x63a6136 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x63a6136%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6.7ms (ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x638c7e0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x637b0d0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x637b0d0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5.8ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x636050a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x636050a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6.9ms (ActiveRecord: 2.0ms)  (0.7ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x634861c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9.4ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x631f88e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.2ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x630e836 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.9ms (Views: 1.2ms | ActiveRecord: 2.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62f8fea @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.0ms (Views: 1.3ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62bb4f6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.4ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62a436e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x62a436e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6.5ms (ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x628c84a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.2ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Fri, 10 Oct 2014 05:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members/12/coord/new" for 127.0.0.1 at 2014-10-10 07:50:10 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"12"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 12 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 83.7ms (Views: 77.9ms | ActiveRecord: 1.9ms)  (1.0ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/12/coord" for 127.0.0.1 at 2014-10-10 07:50:11 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"12"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 12 LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Fri, 10 Oct 2014 05:50:11 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 12], ["office", ""], ["tel", ""], ["updated_at", Fri, 10 Oct 2014 05:50:11 UTC +00:00], ["zip", ""]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/12/adhesions/new Completed 302 Found in 9.1ms (ActiveRecord: 3.6ms) Started GET "/adherent/members/12/adhesions/new" for 127.0.0.1 at 2014-10-10 07:50:11 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"12"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 12 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 12 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (5.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.7ms (Views: 8.9ms | ActiveRecord: 2.4ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_coords"   (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:11 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Fri, 10 Oct 2014 05:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members/13/coord/new" for 127.0.0.1 at 2014-10-10 07:50:11 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"13"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 13 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.0ms (Views: 11.9ms | ActiveRecord: 2.0ms) Started POST "/adherent/members/13/coord" for 127.0.0.1 at 2014-10-10 07:50:11 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"13"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 13 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Fri, 10 Oct 2014 05:50:11 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 13], ["office", ""], ["tel", ""], ["updated_at", Fri, 10 Oct 2014 05:50:11 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/13/adhesions/new Completed 302 Found in 8.5ms (ActiveRecord: 3.0ms) Started GET "/adherent/members/13/adhesions/new" for 127.0.0.1 at 2014-10-10 07:50:11 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"13"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 13 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 13 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (5.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14.8ms (Views: 8.6ms | ActiveRecord: 2.2ms)  (0.8ms) ROLLBACK  (0.5ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:11 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 35], ["updated_at", Fri, 10 Oct 2014 05:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members/14/coord/new" for 127.0.0.1 at 2014-10-10 07:50:11 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"14"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 14 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.1ms (Views: 12.2ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:50:11 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:50:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 36], ["updated_at", Fri, 10 Oct 2014 05:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members/15/coord/new" for 127.0.0.1 at 2014-10-10 07:50:11 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"15"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 15 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.2ms (Views: 13.2ms | ActiveRecord: 3.8ms) Started POST "/adherent/members/15/coord" for 127.0.0.1 at 2014-10-10 07:50:11 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"15"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 15 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Fri, 10 Oct 2014 05:50:11 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 15], ["office", ""], ["tel", ""], ["updated_at", Fri, 10 Oct 2014 05:50:11 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/15/adhesions/new Completed 302 Found in 9.0ms (ActiveRecord: 2.9ms) Started GET "/adherent/members/15/adhesions/new" for 127.0.0.1 at 2014-10-10 07:50:11 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"15"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 15 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 15 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (5.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.3ms (Views: 8.4ms | ActiveRecord: 2.3ms) Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 15 LIMIT 1  (0.3ms) ROLLBACK Connecting to database specified by database.yml  (0.3ms) BEGIN SQL (1.2ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (5.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 37], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 16 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 16 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 16], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/16/payments/new" for 127.0.0.1 at 2014-10-10 07:51:07 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"16"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 37 LIMIT 1 Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 16 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (23.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (29.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.7ms) Completed 200 OK in 113.2ms (Views: 87.8ms | ActiveRecord: 7.0ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 16 Started POST "/adherent/members/16/payments" for 127.0.0.1 at 2014-10-10 07:51:07 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"16"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 16 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 37 LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 16], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 16 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/16/payments Completed 302 Found in 21.4ms (ActiveRecord: 8.4ms) Started GET "/adherent/members/16/payments" for 127.0.0.1 at 2014-10-10 07:51:07 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"16"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 16 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 16 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (21.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 28.5ms (Views: 19.9ms | ActiveRecord: 6.4ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 16 SQL (0.7ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 38], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 17 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 17 ORDER BY to_date DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 17], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/17/payments/new" for 127.0.0.1 at 2014-10-10 07:51:07 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"17"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 38 LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 17 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.1ms (Views: 11.4ms | ActiveRecord: 1.9ms) SQL (1.0ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 39], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 18 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 18 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 18], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 18 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 39 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 18], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 18 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/18/payments" for 127.0.0.1 at 2014-10-10 07:51:07 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"18"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "18"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 18 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 2 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 2  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 2 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 2 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 2 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 18 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.3ms (Views: 12.1ms | ActiveRecord: 4.9ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 40], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 19 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 19 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 19], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 19 LIMIT 1 Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 40 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 19], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 19 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/19/payments" for 127.0.0.1 at 2014-10-10 07:51:07 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"19"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "19"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 19 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 19 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (13.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.6ms (Views: 13.2ms | ActiveRecord: 4.6ms) Started GET "/adherent/payments/3/reglements/new" for 127.0.0.1 at 2014-10-10 07:51:07 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"3"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 19 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 79.4ms (Views: 16.4ms | ActiveRecord: 4.9ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 41], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 20 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 20 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 20], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 20 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 41 LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 20], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 20 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/20/payments/4" for 127.0.0.1 at 2014-10-10 07:51:07 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"20", "id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "20"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 20 AND "adherent_payments"."id" = 4 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 4  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 4 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 20 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 4 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 4 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 4 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (6.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (21.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 30.9ms (Views: 22.4ms | ActiveRecord: 4.7ms) SQL (0.8ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 42], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 21 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 21 ORDER BY to_date DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 21], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 21 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 42 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 21], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 21 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/21/payments/5" for 127.0.0.1 at 2014-10-10 07:51:07 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"21", "id"=>"5"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "21"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 21 AND "adherent_payments"."id" = 5 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 21 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 21.4ms (Views: 13.1ms | ActiveRecord: 4.6ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 43], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 22 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 22 ORDER BY to_date DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 22], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 22 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 43 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 22], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 22 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/22/payments/6" for 127.0.0.1 at 2014-10-10 07:51:07 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"22", "id"=>"6"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "22"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 22 AND "adherent_payments"."id" = 6 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 22 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.6ms (Views: 12.1ms | ActiveRecord: 4.5ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 44], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 23 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 23 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 23], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/23/payments/new" for 127.0.0.1 at 2014-10-10 07:51:07 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"23"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 44 LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 23 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.8ms (Views: 12.7ms | ActiveRecord: 2.2ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 45], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 24 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 24 ORDER BY to_date DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 24], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/24/payments/new" for 127.0.0.1 at 2014-10-10 07:51:07 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"24"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "24"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 45 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 24 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.2ms (Views: 10.8ms | ActiveRecord: 2.5ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN  (1.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", nil], ["city", "Lille"], ["created_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00], ["gsm", nil], ["mail", nil], ["member_id", 25], ["office", nil], ["tel", nil], ["updated_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00], ["zip", 59000]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 25 LIMIT 1  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 4]] SQL (0.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 25]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"   (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.5ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 46], ["updated_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 46], ["updated_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 46], ["updated_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 46], ["updated_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 46], ["updated_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:51:13 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 46  (0.8ms) SHOW max_identifier_length  (2.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 26 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 26 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 27 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 27 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 28 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 28 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 29 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 29 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 30 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 30 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (43.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 70.9ms (Views: 49.6ms | ActiveRecord: 13.6ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 47], ["updated_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 47], ["updated_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 47], ["updated_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 47], ["updated_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 47], ["updated_at", Fri, 10 Oct 2014 05:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:51:13 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 47  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 31 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 31 LIMIT 1  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 32 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 32 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 33 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 33 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 34 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 34 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 35 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 35 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (35.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 42.2ms (Views: 30.7ms | ActiveRecord: 9.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 48], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 48], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 48], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 48], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 48], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members/new" for 127.0.0.1 at 2014-10-10 07:51:14 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (67.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/new.html.erb within layouts/adherent/application (69.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 75.5ms (Views: 72.5ms | ActiveRecord: 0.6ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_members"  Started POST "/adherent/members" for 127.0.0.1 at 2014-10-10 07:51:14 +0200 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.0ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 48], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/41/coord/new Completed 302 Found in 10.8ms (ActiveRecord: 3.6ms) Started GET "/adherent/members/41/coord/new" for 127.0.0.1 at 2014-10-10 07:51:14 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"41"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 41 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22.0ms (Views: 15.7ms | ActiveRecord: 2.6ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 49], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 49], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 49], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 49], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 49], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:51:14 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 49  (1.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 42 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 42 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 43 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 43 LIMIT 1  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 44 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 44 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 45 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 45 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 46 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 46 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (33.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39.6ms (Views: 28.0ms | ActiveRecord: 9.3ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", nil], ["city", "Marseille"], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["gsm", nil], ["mail", nil], ["member_id", 42], ["office", nil], ["tel", nil], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["zip", nil]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 42 LIMIT 1 Started GET "/adherent/members/42/coord" for 127.0.0.1 at 2014-10-10 07:51:14 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"42"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "42"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 42 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/show.html.erb within layouts/adherent/application (2.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 10.6ms (Views: 5.7ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 50], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 50], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 50], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 50], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 50], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:51:14 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 50  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 47 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 47 LIMIT 1  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 48 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 48 LIMIT 1  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 49 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 49 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 50 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 50 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 51 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 51 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (33.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39.6ms (Views: 28.1ms | ActiveRecord: 9.3ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Started GET "/adherent/members/47/payments" for 127.0.0.1 at 2014-10-10 07:51:14 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"47"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 47 Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.9ms (Views: 12.0ms | ActiveRecord: 4.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 51], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 51], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 51], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 51], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 51], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:51:14 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 51  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 52 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 52 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 53 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 53 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 54 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 54 LIMIT 1  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 55 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 55 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 56 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 56 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (33.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39.7ms (Views: 27.9ms | ActiveRecord: 9.4ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 52 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 52 ORDER BY to_date DESC LIMIT 1  (0.7ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 52], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/52/adhesions" for 127.0.0.1 at 2014-10-10 07:51:14 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"52"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "52"]]  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 52 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 52  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 17 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 17 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (17.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27.0ms (Views: 17.7ms | ActiveRecord: 6.2ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 52], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 52], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 52], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 52], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 52], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:51:14 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 52  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 57 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 57 LIMIT 1  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 58 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 58 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 59 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 59 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 60 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 60 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 61 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 61 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (33.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39.4ms (Views: 27.8ms | ActiveRecord: 9.1ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Started GET "/adherent/members/57/coord" for 127.0.0.1 at 2014-10-10 07:51:14 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"57"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "57"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 57 LIMIT 1 Redirected to http://www.example.com/adherent/members/57/coord/new Completed 302 Found in 4.7ms (ActiveRecord: 1.6ms) Started GET "/adherent/members/57/coord/new" for 127.0.0.1 at 2014-10-10 07:51:14 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"57"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "57"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 57 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.3ms (Views: 12.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 53], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 53], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 53], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 53], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 53], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:51:14 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 53  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 62 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 62 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 63 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 63 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 64 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 64 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 65 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 65 LIMIT 1  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 66 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 66 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (33.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40.2ms (Views: 28.0ms | ActiveRecord: 9.7ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Started GET "/adherent/members/62/edit" for 127.0.0.1 at 2014-10-10 07:51:14 +0200 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"62"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "62"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (6.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/edit.html.erb within layouts/adherent/application (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 14.2ms (Views: 11.1ms | ActiveRecord: 1.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 54], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 54], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 54], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 54], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 54], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:51:14 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 54  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 67 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 67 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 68 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 68 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 69 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 69 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 70 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 70 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 71 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 71 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (32.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39.1ms (Views: 27.6ms | ActiveRecord: 9.0ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Started GET "/adherent/members/67/adhesions" for 127.0.0.1 at 2014-10-10 07:51:14 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"67"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "67"]]  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 67 Redirected to http://www.example.com/adherent/members/67/adhesions/new Completed 302 Found in 5.0ms (ActiveRecord: 1.7ms) Started GET "/adherent/members/67/adhesions/new" for 127.0.0.1 at 2014-10-10 07:51:14 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"67"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "67"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 67 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 67 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (9.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.6ms (Views: 11.9ms | ActiveRecord: 2.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 55], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 55], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 55], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 55], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 55], ["updated_at", Fri, 10 Oct 2014 05:51:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:51:14 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 55  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 72 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 72 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 73 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 73 LIMIT 1  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 74 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 74 LIMIT 1  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 75 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 75 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 76 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 76 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (34.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40.4ms (Views: 29.1ms | ActiveRecord: 9.1ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2014-10-10 07:51:15 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (61.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/new.html.erb within layouts/adherent/application (62.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 67.9ms (Views: 64.9ms | ActiveRecord: 0.8ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (1.6ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 56], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"   (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 77], ["to_date", Mon, 10 Nov 2014], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/77/adhesions" for 127.0.0.1 at 2014-10-10 07:51:15 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"77"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "77"]]  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 77 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 77  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 18 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 18 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (6.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14.7ms (Views: 8.8ms | ActiveRecord: 3.0ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 57], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members"  (0.8ms) SAVEPOINT active_record_1 SQL (2.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 78], ["to_date", Mon, 10 Nov 2014], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/78/adhesions" for 127.0.0.1 at 2014-10-10 07:51:15 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"78"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "78"]]  (1.0ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 78 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 78  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 19 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 19 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.9ms (Views: 9.3ms | ActiveRecord: 3.6ms) Started GET "/adherent/members/78/payments/new" for 127.0.0.1 at 2014-10-10 07:51:15 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"78"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "78"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 57 LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 78 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 19 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (12.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 35.3ms (Views: 16.2ms | ActiveRecord: 3.7ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 58], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 79], ["to_date", Mon, 10 Nov 2014], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/79/adhesions" for 127.0.0.1 at 2014-10-10 07:51:15 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"79"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "79"]]  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 79 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 79  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 20 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 20 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (6.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13.6ms (Views: 7.6ms | ActiveRecord: 2.9ms) Started GET "/adherent/members/79/adhesions/20/edit" for 127.0.0.1 at 2014-10-10 07:51:15 +0200 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"79", "id"=>"20"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "79"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 79 AND "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "20"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (5.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/edit.html.erb within layouts/adherent/application (7.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 14.8ms (Views: 9.7ms | ActiveRecord: 2.1ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 59], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members/80/adhesions/new" for 127.0.0.1 at 2014-10-10 07:51:15 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"80"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "80"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 80 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 80 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (4.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (5.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.2ms (Views: 8.9ms | ActiveRecord: 2.3ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 80 Started POST "/adherent/members/80/adhesions" for 127.0.0.1 at 2014-10-10 07:51:15 +0200 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"80"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "80"]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 80], ["to_date", Thu, 31 Jul 2014], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/80/adhesions Completed 302 Found in 8.5ms (ActiveRecord: 2.7ms) Started GET "/adherent/members/80/adhesions" for 127.0.0.1 at 2014-10-10 07:51:15 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"80"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "80"]]  (0.7ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 80 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 80  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 21 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 21 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (6.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14.4ms (Views: 8.1ms | ActiveRecord: 3.4ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 80 SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 60], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members/81/adhesions/new" for 127.0.0.1 at 2014-10-10 07:51:15 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"81"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "81"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 81 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 81 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (4.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (5.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.4ms (Views: 8.7ms | ActiveRecord: 2.4ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" INNER JOIN "adherent_members" ON "adherent_payments"."member_id" = "adherent_members"."id" WHERE "adherent_members"."organism_id" = 61 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/allpayments/index.html.haml within layouts/adherent/application (0.3ms) Completed 200 OK in 67.8ms (Views: 2.6ms | ActiveRecord: 3.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.8ms (Views: 1.6ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.8ms (Views: 1.0ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 65], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/82/coord/new Completed 302 Found in 10.8ms (ActiveRecord: 4.1ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 66], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/83/coord/new Completed 302 Found in 10.4ms (ActiveRecord: 3.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 67], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/84/coord/new Completed 302 Found in 11.1ms (ActiveRecord: 3.7ms)  (0.5ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.7ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.2ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 71 Completed 200 OK in 7.8ms (Views: 1.0ms | ActiveRecord: 2.5ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"85"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 85 AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.7ms) UPDATE "adherent_members" SET "name" = 'Dalton', "updated_at" = '2014-10-10 05:51:15.643342' WHERE "adherent_members"."id" = 85  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/85 Completed 302 Found in 13.2ms (ActiveRecord: 4.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"86"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/86 Completed 302 Found in 5.6ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"87"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/87 Completed 302 Found in 5.8ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"88"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.5ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.7ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x57c7b4e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5.8ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x57e2f34 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5.3ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x57fc65a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x57fc65a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6.1ms (ActiveRecord: 2.1ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x581c644 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x581c644%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5.7ms (ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x583d330 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9.0ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x587d746 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5a355a2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5a355a2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6.0ms (ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5a4fec0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.9ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5a60da6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.8ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5a9de68 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5a9de68%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6.3ms (ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5aeb136 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5aeb136%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5.5ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5b02fb6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.7ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5b1b926 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.4ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5b33e90 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5b4708a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.1ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 92) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 92) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 92], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 89 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 89 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 89], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 89 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 92 LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 89], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 89 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/89/payments" for 127.0.0.1 at 2014-10-10 07:51:15 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"89"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "89"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 89 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 89 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22.0ms (Views: 15.4ms | ActiveRecord: 4.7ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 93], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 90 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 90 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 90], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 90 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 93 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 90], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:15 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 90 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/90/payments" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"90"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "90"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 90 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 90 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.9ms (Views: 10.2ms | ActiveRecord: 4.6ms) Started GET "/adherent/payments/8/reglements/new" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"8"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 90 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (64.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 80.9ms (Views: 69.6ms | ActiveRecord: 5.0ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 94) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 94) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 94], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 91 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 91 ORDER BY to_date DESC LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 91], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/91/payments/new" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"91"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "91"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 94 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 91 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.8ms (Views: 9.3ms | ActiveRecord: 2.5ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 91 Started POST "/adherent/members/91/payments" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"91"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "91"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 91 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 94 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 91], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 91 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/91/payments Completed 302 Found in 13.5ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/91/payments" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"91"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "91"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 91 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 91 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.4ms (Views: 11.2ms | ActiveRecord: 5.3ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 91 SQL (0.5ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 95], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 92 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 92 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 92], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/92/payments/new" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"92"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "92"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 95 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 92 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.3ms (Views: 9.4ms | ActiveRecord: 3.0ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 96], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 93 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 93 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 93], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 93 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 96 LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 93], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 93 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/93/payments/10" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"93", "id"=>"10"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 93 AND "adherent_payments"."id" = 10 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 93 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (6.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30.4ms (Views: 21.9ms | ActiveRecord: 4.8ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 97], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 94 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 94 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 94], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 94 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 97 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 94], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 94 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/94/payments/11" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"94", "id"=>"11"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "94"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 94 AND "adherent_payments"."id" = 11 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 94 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.6ms (Views: 10.8ms | ActiveRecord: 4.6ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 98], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 95 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 95 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 95], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 95 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 98 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 95], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 95 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/95/payments/12" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"95", "id"=>"12"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "95"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 95 AND "adherent_payments"."id" = 12 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 12  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 12 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 95 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 12 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 12 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 12 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.4ms (Views: 10.6ms | ActiveRecord: 4.9ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 99], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 96 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 96 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 96], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/96/payments/new" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"96"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "96"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 99 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 96 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.6ms (Views: 8.1ms | ActiveRecord: 2.7ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 100], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 97 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 97 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 97], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/97/payments/new" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"97"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "97"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 100 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 97 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.3ms (Views: 8.4ms | ActiveRecord: 2.6ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 101], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 101], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (4.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 101], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 98 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 98 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 98], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/98/payments/new" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"98"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "98"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 101 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 98 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 31 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 18.3ms (Views: 8.6ms | ActiveRecord: 3.7ms) Started POST "/adherent/members/98/payments" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"98"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "98"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 98 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 101 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 98], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 98 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 31 SQL (1.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 31], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["payment_id", 13], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/98/payments Completed 302 Found in 18.9ms (ActiveRecord: 7.0ms) Started GET "/adherent/members/98/payments" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"98"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "98"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 98 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 13 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 31 LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 98 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 13  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 13 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 13 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 13 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 98 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24.9ms (Views: 16.4ms | ActiveRecord: 6.4ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 98 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 13  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 13  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.5ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 102], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 102], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 102], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 101 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 101 ORDER BY to_date DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 101], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/101/payments/new" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"101"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "101"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 102 LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 101 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 32 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 18.0ms (Views: 8.8ms | ActiveRecord: 3.2ms) Started POST "/adherent/members/101/payments" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"101"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "101"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 101 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 102 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 101], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 101 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 32 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 32], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["payment_id", 14], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/101/payments Completed 302 Found in 18.5ms (ActiveRecord: 6.3ms) Started GET "/adherent/members/101/payments" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"101"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "101"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 101 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 14 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 32 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 101 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 14  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 14 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 14 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 14 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 101 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.1ms (Views: 13.3ms | ActiveRecord: 5.1ms)  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 101 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 103], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 103], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 103], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 104 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 104 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 104], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/104/payments/new" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"104"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "104"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 103 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 104 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 33 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.7ms (Views: 8.6ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/104/payments" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"104"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "104"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 104 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 103 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 104], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 104 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 33 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 33], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["payment_id", 15], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/104/payments Completed 302 Found in 17.8ms (ActiveRecord: 6.2ms) Started GET "/adherent/members/104/payments" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"104"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "104"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 104 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 15 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 33 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 104 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 15  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 15 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 15 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 15 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 104 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 19.5ms (Views: 12.7ms | ActiveRecord: 5.1ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"   (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (1.1ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 104) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 104) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 104], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 104) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 104) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 104], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 104) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 104) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 104], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 107 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 107 ORDER BY to_date DESC LIMIT 1  (1.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 107], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 107 Started GET "/adherent/members/107/payments/new" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"107"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "107"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 104 LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 107 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 34 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 18.3ms (Views: 8.8ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/107/payments" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"107"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "107"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 107 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 104 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 107], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 107 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 34 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 34], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00], ["payment_id", 16], ["updated_at", Fri, 10 Oct 2014 05:51:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/107/payments Completed 302 Found in 17.2ms (ActiveRecord: 6.0ms) Started GET "/adherent/members/107/payments" for 127.0.0.1 at 2014-10-10 07:51:16 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"107"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "107"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 107 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 16 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 34 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 107 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 16  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 16 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 16 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 16 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 107 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.8ms (Views: 12.9ms | ActiveRecord: 5.2ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 107  (0.5ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 105) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 105) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 105], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 105) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 105) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 105], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 105) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 105) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 105], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 110 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 110 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 110], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/110/payments/new" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"110"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "110"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 105 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 110 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 35 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.2ms (Views: 8.7ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/110/payments" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"110"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "110"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 110 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 105 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 110], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 110 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 35 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 35], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["payment_id", 17], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/110/payments Completed 302 Found in 17.7ms (ActiveRecord: 5.9ms) Started GET "/adherent/members/110/payments" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"110"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "110"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 110 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 17 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 35 LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 110 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 17  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 17 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 17 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 17 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 110 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.5ms (Views: 12.6ms | ActiveRecord: 5.2ms)  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 110 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 106) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 106) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 106], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 106) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 106) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 106], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 106) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 106) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 106], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 113 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 113 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 113], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/113/payments/new" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"113"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "113"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 106 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 113 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 36 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.9ms (Views: 9.0ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/113/payments" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"113"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "113"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 113 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 106 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 113], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 113 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 36 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 36], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["payment_id", 18], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/113/payments Completed 302 Found in 16.9ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/113/payments" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"113"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "113"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 113 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 18 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 36 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 113 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 18  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 18 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 18 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 18 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 113 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.7ms (Views: 13.1ms | ActiveRecord: 4.8ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 113 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 114 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 114 ORDER BY to_date DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 114], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 115 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 115 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 115], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/18/reglements/new" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"18"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "18"]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 113 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 18  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 18 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 18 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 18 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 114 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 37 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 115 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 38 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 26.9ms (Views: 14.6ms | ActiveRecord: 7.2ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 107) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 107) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 107], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 107) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 107) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 107], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 107) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 107) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 107], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 116 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 116 ORDER BY to_date DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 116], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/116/payments/new" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"116"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "116"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 107 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 116 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 39 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.2ms (Views: 8.4ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/116/payments" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"116"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "116"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 116 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 107 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 116], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 116 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 39 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 39], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["payment_id", 19], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/116/payments Completed 302 Found in 16.8ms (ActiveRecord: 5.9ms) Started GET "/adherent/members/116/payments" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"116"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "116"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 116 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 39 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 116 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 116 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.0ms (Views: 13.8ms | ActiveRecord: 5.6ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 116 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 117 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 117 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 117], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 118 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 118 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 118], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/19/reglements/new" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"19"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "19"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 116 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 118 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 41 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 117 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 40 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25.3ms (Views: 14.5ms | ActiveRecord: 6.7ms) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 116 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 116 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 19  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 108) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 108) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 108], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 108) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 108) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 108], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 108) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 108) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 108], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 119 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 119 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 119], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/119/payments/new" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"119"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "119"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 108 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 119 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 42 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.3ms (Views: 8.9ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/119/payments" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"119"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "119"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 119 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 108 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 119], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 119 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 42 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 42], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["payment_id", 20], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/119/payments Completed 302 Found in 17.1ms (ActiveRecord: 5.9ms) Started GET "/adherent/members/119/payments" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"119"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "119"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 119 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 20 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 42 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 119 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 20  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 20 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 20 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 20 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 119 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.5ms (Views: 13.4ms | ActiveRecord: 5.2ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 119 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 120 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 120 ORDER BY to_date DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 120], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 121 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 121 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 121], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/20/reglements/new" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"20"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "20"]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 119 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 20  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 20 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 20 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 20 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 121 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 44 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 120 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 43 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25.4ms (Views: 13.6ms | ActiveRecord: 7.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 109) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 109) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 109], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 109) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 109) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 109], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 109) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 109) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 109], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 122 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 122 ORDER BY to_date DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 122], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/122/payments/new" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"122"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "122"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 109 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 122 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 45 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.3ms (Views: 8.5ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/122/payments" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"122"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "122"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 122 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 109 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 122], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 122 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 45 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 45], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["payment_id", 21], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/122/payments Completed 302 Found in 16.4ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/122/payments" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"122"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "122"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 122 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 45 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 122 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 122 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.4ms (Views: 12.6ms | ActiveRecord: 5.1ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 122 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 123 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 123 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 123], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 124 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 124 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 124], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/21/reglements/new" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"21"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "21"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 122 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 124 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 47 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 123 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 46 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (12.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25.5ms (Views: 13.8ms | ActiveRecord: 7.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 110) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 110) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 110], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 110) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 110) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 110], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 110) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 110) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 110], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 125 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 125 ORDER BY to_date DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 125], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/125/payments/new" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"125"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "125"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 110 LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 125 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 48 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.2ms (Views: 8.1ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/125/payments" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"125"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "125"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 125 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 110 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 125], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 125 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 48 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 48], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["payment_id", 22], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/125/payments Completed 302 Found in 17.3ms (ActiveRecord: 6.4ms) Started GET "/adherent/members/125/payments" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"125"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "125"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 125 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 48 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 125 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 125 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.1ms (Views: 13.4ms | ActiveRecord: 5.2ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 125 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 126 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 126 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 126], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 127 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 127 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 127], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/22/reglements/new" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"22"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "22"]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 125 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 127 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 50 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 126 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 49 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 25.3ms (Views: 13.6ms | ActiveRecord: 7.4ms) Started POST "/adherent/payments/22/reglements" for 127.0.0.1 at 2014-10-10 07:51:17 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"49"}, "commit"=>"Enregistrer", "payment_id"=>"22"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "22"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "49"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 49  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 49], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00], ["payment_id", 22], ["updated_at", Fri, 10 Oct 2014 05:51:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 125 LIMIT 1 Redirected to http://www.example.com/adherent/members/125/payments Completed 302 Found in 13.7ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/125/payments" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"125"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "125"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 125 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 48 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 125 LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 49 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 126 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 125 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23.0ms (Views: 15.3ms | ActiveRecord: 6.1ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (3.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 49 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 126 LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.7ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 111) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 111) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 111], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 111) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 111) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 111], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 111) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 111) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 111], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 128 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 128 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 128], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/128/payments/new" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"128"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "128"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 111 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 128 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 51 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.7ms (Views: 8.6ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/128/payments" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"128"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "128"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 128 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 111 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 128], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 128 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 51 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 51], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["payment_id", 23], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/128/payments Completed 302 Found in 17.8ms (ActiveRecord: 6.2ms) Started GET "/adherent/members/128/payments" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"128"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "128"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 128 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 51 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 128 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 128 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.6ms (Views: 13.3ms | ActiveRecord: 5.6ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 128 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 129 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 129 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 129], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 130 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 130 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 130], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/23/reglements/new" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"23"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "23"]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 128 LIMIT 1 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 130 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 53 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 129 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 52 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (12.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28.1ms (Views: 14.3ms | ActiveRecord: 8.3ms) Started POST "/adherent/payments/23/reglements" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"52"}, "commit"=>"Enregistrer", "payment_id"=>"23"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "23"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "52"]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 52  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 52], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["payment_id", 23], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 128 LIMIT 1 Redirected to http://www.example.com/adherent/members/128/payments Completed 302 Found in 13.5ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/128/payments" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"128"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "128"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 128 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 51 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 128 LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 52 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 129 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 128 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23.3ms (Views: 15.6ms | ActiveRecord: 6.2ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 112) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 112) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 112], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 112) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 112) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 112], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 112) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 112) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 112], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 131 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 131 ORDER BY to_date DESC LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 131], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/131/payments/new" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"131"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "131"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 112 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 131 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 54 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.2ms (Views: 9.1ms | ActiveRecord: 3.2ms) Started POST "/adherent/members/131/payments" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"131"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "131"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 131 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 112 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 131], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 131 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 54 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 54], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["payment_id", 24], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/131/payments Completed 302 Found in 17.1ms (ActiveRecord: 6.2ms) Started GET "/adherent/members/131/payments" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"131"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "131"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 131 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 54 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 131 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 131 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.4ms (Views: 12.3ms | ActiveRecord: 5.3ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 131 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 132 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 132 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 132], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 133 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 133 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 133], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/24/reglements/new" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"24"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "24"]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 131 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 133 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 56 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 132 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 55 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 25.3ms (Views: 14.1ms | ActiveRecord: 6.9ms) Started POST "/adherent/payments/24/reglements" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"55"}, "commit"=>"Enregistrer", "payment_id"=>"24"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "24"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "55"]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 55  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["payment_id", 24], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 131 LIMIT 1 Redirected to http://www.example.com/adherent/members/131/payments Completed 302 Found in 13.0ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/131/payments" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"131"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "131"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 131 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 54 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 131 LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 55 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 132 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 131 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23.3ms (Views: 15.5ms | ActiveRecord: 6.4ms)  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 113) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 113) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 113], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 113) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 113) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 113], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 113) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 113) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 113], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 134 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 134 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 134], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/134/payments/new" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"134"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "134"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 113 LIMIT 1 Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 134 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 57 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.9ms (Views: 8.9ms | ActiveRecord: 3.8ms) Started POST "/adherent/members/134/payments" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"134"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "134"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 134 LIMIT 1 Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 113 LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 134], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 134 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 57 SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 57], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["payment_id", 25], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/134/payments Completed 302 Found in 28.2ms (ActiveRecord: 9.8ms) Started GET "/adherent/members/134/payments" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"134"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "134"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 134 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 57 LIMIT 1 Adherent::Member Load (4.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 134 LIMIT 1 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 134 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (68.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 76.4ms (Views: 65.0ms | ActiveRecord: 9.7ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 134 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 135 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 135 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 135], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 136 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 136 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 136], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/25/reglements/new" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"25"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "25"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 134 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 136 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 59 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 135 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 58 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25.8ms (Views: 14.5ms | ActiveRecord: 6.9ms) Started POST "/adherent/payments/25/reglements" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"58"}, "commit"=>"Enregistrer", "payment_id"=>"25"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "25"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "58"]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 58  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 58], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["payment_id", 25], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 134 LIMIT 1 Redirected to http://www.example.com/adherent/members/134/payments Completed 302 Found in 13.4ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/134/payments" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"134"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "134"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 134 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 57 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 134 LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 58 LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 135 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 134 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23.9ms (Views: 15.5ms | ActiveRecord: 6.7ms) Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 135 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 58  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 114) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 114) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 114], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 114) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 114) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 114], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 114) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 114) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 114], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 137 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 137 ORDER BY to_date DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 137], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/137/payments/new" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"137"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "137"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 114 LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 137 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 60 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.1ms (Views: 9.0ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/137/payments" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"137"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "137"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 137 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 114 LIMIT 1 SQL (1.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 137], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 137 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 60 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 60], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["payment_id", 26], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/137/payments Completed 302 Found in 18.0ms (ActiveRecord: 7.0ms) Started GET "/adherent/members/137/payments" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"137"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "137"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 137 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 60 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 137 LIMIT 1 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 137 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.5ms (Views: 13.1ms | ActiveRecord: 5.7ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 137 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 138 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 138 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 138], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 139 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 139 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 139], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/26/reglements/new" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"26"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 137 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26 Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 139 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 62 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 138 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 61 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26.5ms (Views: 14.2ms | ActiveRecord: 7.8ms) Started POST "/adherent/payments/26/reglements" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"61"}, "commit"=>"Enregistrer", "payment_id"=>"26"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "61"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 61  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 61], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["payment_id", 26], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 137 LIMIT 1 Redirected to http://www.example.com/adherent/members/137/payments Completed 302 Found in 13.6ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/137/payments" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"137"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "137"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 137 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 60 LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 137 LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 61 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 138 LIMIT 1 Adherent::Reglement Load (1.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 26 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 137 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (19.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28.2ms (Views: 19.0ms | ActiveRecord: 7.6ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 60 LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 137 LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 115) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 115) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 115], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 115) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 115) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 115], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 115) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 115) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 115], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 140 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 140 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 140], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:18 UTC +00:00]]  (1.7ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/140/payments/new" for 127.0.0.1 at 2014-10-10 07:51:18 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"140"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "140"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 115 LIMIT 1 Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 140 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 63 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.6ms (Views: 7.9ms | ActiveRecord: 4.3ms) Started POST "/adherent/members/140/payments" for 127.0.0.1 at 2014-10-10 07:51:19 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"140"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "140"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 140 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 115 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 140], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 140 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 63 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 63], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["payment_id", 27], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/140/payments Completed 302 Found in 19.0ms (ActiveRecord: 6.0ms) Started GET "/adherent/members/140/payments" for 127.0.0.1 at 2014-10-10 07:51:19 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"140"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "140"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 140 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 27 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 63 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 140 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 27  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 27 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 27 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 27 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 140 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.8ms (Views: 13.1ms | ActiveRecord: 5.1ms) Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 140 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 63  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 116) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 116) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 116], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 116) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 116) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 116], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 116) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 116) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 116], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 143 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 143 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 143], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/143/payments/new" for 127.0.0.1 at 2014-10-10 07:51:19 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"143"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "143"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 116 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 143 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 64 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.1ms (Views: 8.5ms | ActiveRecord: 3.2ms) Started POST "/adherent/members/143/payments" for 127.0.0.1 at 2014-10-10 07:51:19 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"143"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "143"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 143 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 116 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 143], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 143 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 64 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 64], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["payment_id", 28], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/143/payments Completed 302 Found in 18.7ms (ActiveRecord: 6.4ms) Started GET "/adherent/members/143/payments" for 127.0.0.1 at 2014-10-10 07:51:19 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"143"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "143"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 143 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 28 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 64 LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 143 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 28  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 28 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 28 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 28 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 143 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22.7ms (Views: 15.2ms | ActiveRecord: 5.6ms)  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 143 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.1ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 117) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 117) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 117], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 117) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 117) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 117], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 146], ["to_date", Sat, 31 Aug 2013], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 147], ["to_date", Sat, 31 Aug 2013], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 147 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 117 LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 147], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 147 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 66 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 66], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["payment_id", 29], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 146 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 117 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 146], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 146 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 65 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 65], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["payment_id", 30], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 118) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 118) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 118], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 118) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 118) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 118], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 148], ["to_date", Sat, 31 Aug 2013], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 149], ["to_date", Sat, 31 Aug 2013], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 149 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 118 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 149], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 149 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 68 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 68], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["payment_id", 31], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 119) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 119) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 119], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 119) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 119) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 119], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 150], ["to_date", Sat, 31 Aug 2013], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 151], ["to_date", Sat, 31 Aug 2013], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 151 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 119 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 151], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 151 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 70 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 70], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["payment_id", 32], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 151 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 119 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 151], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 151 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 70 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 70], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["payment_id", 33], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 150 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 119 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 150], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 150 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 69 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 69], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["payment_id", 34], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 1], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 71  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 71], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["payment_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 71  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 71  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 1], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 72  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 72], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["payment_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 72  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 1], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 73  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 73], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["payment_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x5a3c65e @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5a3c686%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5.6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5a5a4e2 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.1ms (Views: 1.2ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5a8b970 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.0ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" IS NULL ORDER BY to_date DESC LIMIT 1  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" IS NULL ORDER BY to_date DESC LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" IS NULL ORDER BY to_date DESC LIMIT 1  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 152 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 152 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 152], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 152 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 152 ORDER BY to_date DESC LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 153 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 153 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 153], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 153 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 153 ORDER BY to_date DESC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 154 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 154 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 154], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 154 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 154 ORDER BY to_date DESC LIMIT 1  (0.2ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 123) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 123) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 123], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members/158/coord/new" for 127.0.0.1 at 2014-10-10 07:51:19 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"158"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "158"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 158 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.9ms (Views: 11.4ms | ActiveRecord: 1.8ms)  (1.0ms) SELECT COUNT(*) FROM "adherent_coords"  Started POST "/adherent/members/158/coord" for 127.0.0.1 at 2014-10-10 07:51:19 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"158"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "158"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 158 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 158], ["office", ""], ["tel", ""], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["zip", ""]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/158/adhesions/new Completed 302 Found in 10.0ms (ActiveRecord: 3.2ms) Started GET "/adherent/members/158/adhesions/new" for 127.0.0.1 at 2014-10-10 07:51:19 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"158"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "158"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 158 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 158 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (4.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.5ms (Views: 8.7ms | ActiveRecord: 2.4ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 124) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 124) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 124], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members/159/coord/new" for 127.0.0.1 at 2014-10-10 07:51:19 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"159"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "159"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 159 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.3ms (Views: 10.9ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 125) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 125) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 125], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members/160/coord/new" for 127.0.0.1 at 2014-10-10 07:51:19 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"160"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "160"]] Adherent::Coord Load (1.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 160 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.7ms (Views: 11.5ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/160/coord" for 127.0.0.1 at 2014-10-10 07:51:19 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"160"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "160"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 160 LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 160], ["office", ""], ["tel", ""], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["zip", ""]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/160/adhesions/new Completed 302 Found in 9.2ms (ActiveRecord: 3.4ms) Started GET "/adherent/members/160/adhesions/new" for 127.0.0.1 at 2014-10-10 07:51:19 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"160"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "160"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 160 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 160 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (5.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.7ms (Views: 9.1ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 126) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 126) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 126], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members/161/coord/new" for 127.0.0.1 at 2014-10-10 07:51:19 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"161"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "161"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 161 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.5ms (Views: 10.9ms | ActiveRecord: 1.5ms) Started POST "/adherent/members/161/coord" for 127.0.0.1 at 2014-10-10 07:51:19 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"161"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "161"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 161 LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 161], ["office", ""], ["tel", ""], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/161/adhesions/new Completed 302 Found in 9.6ms (ActiveRecord: 3.9ms) Started GET "/adherent/members/161/adhesions/new" for 127.0.0.1 at 2014-10-10 07:51:19 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"161"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "161"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 161 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 161 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (5.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14.7ms (Views: 8.0ms | ActiveRecord: 2.9ms) Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 161 LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x56df542 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x56fafae @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.8ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5712eec @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.8ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5734920 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x573d8c2 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.5ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5754946 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5754946%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5.5ms (ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x577b32a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x577b32a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5.6ms (ActiveRecord: 2.0ms)  (0.1ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"10/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5794460 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.0ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 134) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 134) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 134], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 162], ["to_date", Mon, 10 Nov 2014], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 162 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 162 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["from_date", Tue, 11 Nov 2014], ["member_id", 162], ["to_date", Tue, 10 Nov 2015], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 162 LIMIT 1 Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 134 LIMIT 1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 135) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 135) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 135], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"   (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 163], ["to_date", Mon, 10 Nov 2014], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 163 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 163 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["from_date", Tue, 11 Nov 2014], ["member_id", 163], ["to_date", Tue, 10 Nov 2015], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 163 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 135 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 163], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 163 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 79 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 79], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["payment_id", 35], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 136) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 136) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 136], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"   (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 164], ["to_date", Mon, 10 Nov 2014], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 164 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 164 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["from_date", Tue, 11 Nov 2014], ["member_id", 164], ["to_date", Tue, 10 Nov 2015], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 164 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 136 LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 164], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 164 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 81 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 81], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["payment_id", 36], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 82 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 82], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["payment_id", 36], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.8ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 137) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 137) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 137], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"   (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 165], ["to_date", Mon, 10 Nov 2014], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 165 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 165 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["from_date", Tue, 11 Nov 2014], ["member_id", 165], ["to_date", Tue, 10 Nov 2015], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 165 LIMIT 1 Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 137 LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_payments"   (0.3ms) ROLLBACK  (1.0ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (1.1ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (8.0ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 138) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 138) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 138], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 166], ["to_date", Mon, 10 Nov 2014], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 166 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 166 ORDER BY to_date DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["from_date", Tue, 11 Nov 2014], ["member_id", 166], ["to_date", Tue, 10 Nov 2015], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 166 LIMIT 1 Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 138 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 166], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 166 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 85 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 85], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["payment_id", 37], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 86 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 86], ["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["payment_id", 37], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 37  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" IS NULL  (0.1ms) ROLLBACK SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 139) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 139) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 139], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 139) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 139) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 139], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 139) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 139) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 139], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 139) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 139) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 139], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 139) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 139) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 139], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (2.2ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 167 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 167 ORDER BY to_date DESC LIMIT 1  (0.4ms) BEGIN SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 167], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:20 UTC +00:00]]  (1.7ms) COMMIT Started GET "/adherent/members/167/adhesions" for 127.0.0.1 at 2014-10-10 07:51:24 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"167"} Organism Load (2.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "167"]]  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 167 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 167  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 87 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 87 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 36.6ms (Views: 12.1ms | ActiveRecord: 15.3ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2014-10-10 07:51:24 +0200 Served asset /adherent/application.css - 200 OK (45ms) Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2014-10-10 07:51:24 +0200 Served asset /adherent/application.js - 200 OK (19ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2014-10-10 07:51:24 +0200 Served asset /adherent/icones/users.png - 200 OK (2ms) Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2014-10-10 07:51:24 +0200 Served asset /adherent/icones/modifier.png - 200 OK (2ms) Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2014-10-10 07:51:24 +0200 Served asset /adherent/icones/nouveau.png - 200 OK (7ms) Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2014-10-10 07:51:24 +0200 Served asset /adherent/icones/supprimer.png - 200 OK (2ms) Started DELETE "/adherent/members/167/adhesions/87" for 127.0.0.1 at 2014-10-10 07:51:25 +0200 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"167", "id"=>"87"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "167"]] Adherent::Adhesion Load (2.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 167 AND "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "87"]]  (0.8ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 87]]  (201.7ms) COMMIT Redirected to http://127.0.0.1:43110/adherent/members/167/adhesions Completed 302 Found in 215.4ms (ActiveRecord: 207.2ms) Started GET "/adherent/members/167/adhesions" for 127.0.0.1 at 2014-10-10 07:51:25 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"167"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "167"]]  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 167 Redirected to http://127.0.0.1:43110/adherent/members/167/adhesions/new Completed 302 Found in 5.9ms (ActiveRecord: 1.9ms) Started GET "/adherent/members/167/adhesions/new" for 127.0.0.1 at 2014-10-10 07:51:25 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"167"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "167"]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 167 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 167 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.4ms (Views: 10.5ms | ActiveRecord: 4.7ms) Started GET "/assets/adherent/cal.gif" for 127.0.0.1 at 2014-10-10 07:51:25 +0200 Served asset /adherent/cal.gif - 200 OK (2ms)  (1.3ms) SELECT COUNT(*) FROM "adherent_adhesions"  (1.0ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (2.0ms) select table_name from information_schema.views where table_schema = 'adh_test'  (101.5ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (1.0ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (0.9ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:26 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:26 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:26 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:26 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:26 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:26 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:26 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:51:26 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 1  (0.2ms) SHOW max_identifier_length  (2.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 1 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 2 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 2 LIMIT 1  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 3 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 3 LIMIT 1  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 4 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 4 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 5 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 5 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 52.6ms (Views: 36.7ms | ActiveRecord: 12.2ms) Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2014-10-10 07:51:26 +0200 Served asset /adherent/icones/payment.png - 200 OK (7ms) Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2014-10-10 07:51:26 +0200 Served asset /adherent/icones/card-address.png - 200 OK (2ms) Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2014-10-10 07:51:26 +0200 Served asset /adherent/icones/bandaid.png - 200 OK (2ms) Started GET "/assets/images/sort_both.png" for 127.0.0.1 at 2014-10-10 07:51:26 +0200 Served asset /images/sort_both.png - 200 OK (11ms) Started GET "/assets/images/sort_asc.png" for 127.0.0.1 at 2014-10-10 07:51:26 +0200 Served asset /images/sort_asc.png - 200 OK (3ms) Started GET "/assets/images/back_disabled.png" for 127.0.0.1 at 2014-10-10 07:51:26 +0200 Served asset /images/back_disabled.png - 200 OK (2ms) Started GET "/assets/images/forward_disabled.png" for 127.0.0.1 at 2014-10-10 07:51:26 +0200 Served asset /images/forward_disabled.png - 200 OK (3ms) Started DELETE "/adherent/members/1" for 127.0.0.1 at 2014-10-10 07:51:27 +0200 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.2ms) BEGIN Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 1 LIMIT 1 SQL (0.8ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (125.1ms) COMMIT Redirected to http://127.0.0.1:43110/adherent/members Completed 302 Found in 134.9ms (ActiveRecord: 127.5ms) Started GET "/adherent/members" for 127.0.0.1 at 2014-10-10 07:51:27 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 1  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 2 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 2 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 3 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 3 LIMIT 1  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 4 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 4 LIMIT 1  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 5 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 5 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 99.4ms (Views: 88.0ms | ActiveRecord: 8.6ms)  (3.9ms) SELECT COUNT(*) FROM "adherent_members"   (2.2ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (110.9ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (1.0ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:28 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:28 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:28 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:28 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:28 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:28 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Fri, 10 Oct 2014 05:51:28 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members"   (0.4ms) BEGIN Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 1 LIMIT 1 Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 1 LIMIT 1 SQL (2.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:28 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Fri, 10 Oct 2014 05:51:28 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (1.5ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2014-10-10 07:51:28 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 1 AND "adherent_payments"."id" = 1 LIMIT 1 Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 1 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28.8ms (Views: 15.4ms | ActiveRecord: 7.6ms) Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2014-10-10 07:51:28 +0200 Served asset /adherent/icones/money-plus.png - 200 OK (2ms) Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2014-10-10 07:51:28 +0200 Served asset /adherent/icones/printer.png - 200 OK (2ms) Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2014-10-10 07:51:28 +0200 Served asset /adherent/icones/imputation.png - 200 OK (2ms) Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2014-10-10 07:51:29 +0200 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (5.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 1 AND "adherent_payments"."id" = $1 LIMIT 1 [["id", "1"]]  (0.1ms) BEGIN Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 SQL (0.4ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (127.4ms) COMMIT Redirected to http://127.0.0.1:43110/adherent/members/1/payments Completed 302 Found in 143.6ms (ActiveRecord: 134.7ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2014-10-10 07:51:29 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 1 Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 12.8ms (Views: 6.8ms | ActiveRecord: 2.3ms)  (2.0ms) SELECT COUNT(*) FROM "adherent_payments"   (1.1ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (99.3ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x582db42 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8.3ms (Views: 2.7ms | ActiveRecord: 2.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x585b506 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x585b506%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5.8ms (ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x58842a8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.3ms (Views: 1.0ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5a386ee @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.5ms (Views: 1.5ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5a52b5c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.6ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.9ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5a78b54 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5a78b54%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 7.5ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5adfdae @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5adfdae%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6.0ms (ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5af29a4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.5ms (Views: 1.7ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (1.0ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5b06346 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.8ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.6ms (Views: 1.0ms | ActiveRecord: 2.4ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5b1e9be @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.8ms (Views: 1.3ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5b39782 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.1ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK Connecting to database specified by database.yml  (0.3ms) BEGIN SQL (1.1ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (7.4ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:50 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (2.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 12], ["updated_at", Fri, 10 Oct 2014 05:51:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:50 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 1], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/1/payments/new" for 127.0.0.1 at 2014-10-10 07:51:50 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 12 LIMIT 1 Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (23.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (30.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.7ms) Completed 200 OK in 112.2ms (Views: 87.6ms | ActiveRecord: 7.1ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 13], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 2 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 2 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 2], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/2/payments/new" for 127.0.0.1 at 2014-10-10 07:51:51 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"2"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 13 LIMIT 1 Adherent::Adhesion Load (4.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 2 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23.4ms (Views: 11.4ms | ActiveRecord: 6.2ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.7ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 3 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 3 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 3], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 3 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 14 LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 3], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 3 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/3/payments/1" for 127.0.0.1 at 2014-10-10 07:51:51 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"3", "id"=>"1"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 3 AND "adherent_payments"."id" = 1 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 3 LIMIT 1 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (7.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (25.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 37.0ms (Views: 26.0ms | ActiveRecord: 6.5ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 4 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 4 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 4], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 4 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 15 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 4], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 4 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/4/payments/2" for 127.0.0.1 at 2014-10-10 07:51:51 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"4", "id"=>"2"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 4 AND "adherent_payments"."id" = 2 LIMIT 1 Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 2  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 2 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 4 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 2 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 2 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 2 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22.6ms (Views: 13.4ms | ActiveRecord: 5.7ms) SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.4ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 16], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 5 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 5 ORDER BY to_date DESC LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 5], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 5 LIMIT 1 Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 16 LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 5], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 5 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/5/payments/3" for 127.0.0.1 at 2014-10-10 07:51:51 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"5", "id"=>"3"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 5 AND "adherent_payments"."id" = 3 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 5 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (13.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23.2ms (Views: 13.2ms | ActiveRecord: 5.8ms) SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 17], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 6 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 6 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 6], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (3.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 6 LIMIT 1 Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 17 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 6], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 6 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/6/payments" for 127.0.0.1 at 2014-10-10 07:51:51 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"6"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "6"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 6 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 4 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 4  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 4 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 4 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 4 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 6 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (20.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27.6ms (Views: 20.6ms | ActiveRecord: 5.0ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.3ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 7 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 7 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 7], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 7 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 18 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 7], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 7 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/7/payments" for 127.0.0.1 at 2014-10-10 07:51:51 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"7"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 7 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 7 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (12.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.2ms (Views: 11.9ms | ActiveRecord: 4.9ms) Started GET "/adherent/payments/5/reglements/new" for 127.0.0.1 at 2014-10-10 07:51:51 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"5"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 7 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (15.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 35.7ms (Views: 18.9ms | ActiveRecord: 4.6ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 8 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 8 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 8], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/8/payments/new" for 127.0.0.1 at 2014-10-10 07:51:51 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"8"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 19 LIMIT 1 Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 8 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 21.8ms (Views: 10.9ms | ActiveRecord: 3.2ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 8 Started POST "/adherent/members/8/payments" for 127.0.0.1 at 2014-10-10 07:51:51 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"10/10/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"8"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 8 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 19 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["date", Fri, 10 Oct 2014], ["member_id", 8], ["mode", "CB"], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 8 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/8/payments Completed 302 Found in 13.4ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/8/payments" for 127.0.0.1 at 2014-10-10 07:51:51 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"8"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 8 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 8 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.6ms (Views: 10.6ms | ActiveRecord: 4.9ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 8 SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.4ms) BEGIN SQL (1.0ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 9 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 9 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00], ["from_date", Fri, 10 Oct 2014], ["member_id", 9], ["to_date", Fri, 09 Oct 2015], ["updated_at", Fri, 10 Oct 2014 05:51:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/9/payments/new" for 127.0.0.1 at 2014-10-10 07:51:51 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"9"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "9"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 20 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 9 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (6.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.2ms (Views: 9.7ms | ActiveRecord: 2.6ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK Connecting to database specified by database.yml  (0.4ms) BEGIN SQL (1.1ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (5.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:49 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:49 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Sat, 11 Oct 2014 05:15:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.6ms) SAVEPOINT active_record_1 SQL (2.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 10], ["to_date", Tue, 11 Nov 2014], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/10/adhesions" for 127.0.0.1 at 2014-10-11 07:15:50 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"10"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "10"]]  (0.7ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 10 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 10  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 10 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 10 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (19.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 42.9ms (Views: 32.3ms | ActiveRecord: 6.7ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"   (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 11], ["to_date", Tue, 11 Nov 2014], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/11/adhesions" for 127.0.0.1 at 2014-10-11 07:15:50 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"11"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]]  (0.5ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 11 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 11  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 11 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 11 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14.5ms (Views: 8.6ms | ActiveRecord: 3.3ms) Started GET "/adherent/members/11/payments/new" for 127.0.0.1 at 2014-10-11 07:15:50 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"11"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 22 LIMIT 1 Adherent::Adhesion Load (2.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 11 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 11 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (21.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (25.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 55.9ms (Views: 29.2ms | ActiveRecord: 7.6ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members"   (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 12], ["to_date", Tue, 11 Nov 2014], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/12/adhesions" for 127.0.0.1 at 2014-10-11 07:15:50 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"12"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "12"]]  (0.9ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 12 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 12  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 12 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 12 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (6.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 61.7ms (Views: 8.2ms | ActiveRecord: 4.3ms) Started GET "/adherent/members/12/adhesions/12/edit" for 127.0.0.1 at 2014-10-11 07:15:50 +0200 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"12", "id"=>"12"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 12 AND "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "12"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (6.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/edit.html.erb within layouts/adherent/application (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.7ms (Views: 12.5ms | ActiveRecord: 1.9ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members/13/adhesions/new" for 127.0.0.1 at 2014-10-11 07:15:50 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"13"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 13 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 13 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (4.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (7.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.1ms (Views: 10.1ms | ActiveRecord: 2.6ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 13 Started POST "/adherent/members/13/adhesions" for 127.0.0.1 at 2014-10-11 07:15:50 +0200 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"13"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 13], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/13/adhesions Completed 302 Found in 9.7ms (ActiveRecord: 2.6ms) Started GET "/adherent/members/13/adhesions" for 127.0.0.1 at 2014-10-11 07:15:50 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"13"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]]  (0.5ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 13 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 13  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 13 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 13 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (7.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14.0ms (Views: 7.9ms | ActiveRecord: 3.5ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 13 SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members/14/adhesions/new" for 127.0.0.1 at 2014-10-11 07:15:50 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"14"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 14 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 14 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (5.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (6.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.1ms (Views: 8.8ms | ActiveRecord: 2.2ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 26], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 26], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 26], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 26], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-11 07:15:50 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 26  (0.5ms) SHOW max_identifier_length  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 15 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 15 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 16 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 16 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 17 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 17 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 18 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 18 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 19 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 19 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (42.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 51.9ms (Views: 35.6ms | ActiveRecord: 12.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 27], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 27], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 27], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 27], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 27], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-11 07:15:50 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 27  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 20 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 20 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 21 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 21 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 22 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 22 LIMIT 1  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 23 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 23 LIMIT 1  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 24 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 24 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (36.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 42.4ms (Views: 31.0ms | ActiveRecord: 9.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 28], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 28], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 28], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 28], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members/new" for 127.0.0.1 at 2014-10-11 07:15:50 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (58.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/new.html.erb within layouts/adherent/application (60.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 66.4ms (Views: 63.9ms | ActiveRecord: 0.5ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members"  Started POST "/adherent/members" for 127.0.0.1 at 2014-10-11 07:15:50 +0200 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 28], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/30/coord/new Completed 302 Found in 8.7ms (ActiveRecord: 2.6ms) Started GET "/adherent/members/30/coord/new" for 127.0.0.1 at 2014-10-11 07:15:50 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"30"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "30"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 30 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (10.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (13.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34.7ms (Views: 17.7ms | ActiveRecord: 1.9ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 29], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 29], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 29], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 29], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members" for 127.0.0.1 at 2014-10-11 07:15:50 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 29  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 31 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 31 LIMIT 1  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 32 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 32 LIMIT 1  (1.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 33 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 33 LIMIT 1  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 34 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 34 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 35 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 35 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (42.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 48.5ms (Views: 35.9ms | ActiveRecord: 10.3ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 31 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 31 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 31], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/31/adhesions" for 127.0.0.1 at 2014-10-11 07:15:50 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"31"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]]  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 31 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 31  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 14 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 14 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (5.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 12.0ms (Views: 6.9ms | ActiveRecord: 2.8ms)  (0.2ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 30], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 30], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 30], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 30], ["updated_at", Sat, 11 Oct 2014 05:15:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-11 07:15:50 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 30  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 36 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 36 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 37 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 37 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 38 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 38 LIMIT 1  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 39 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 39 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 40 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 40 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (33.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39.7ms (Views: 28.3ms | ActiveRecord: 9.1ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", nil], ["city", "Marseille"], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["gsm", nil], ["mail", nil], ["member_id", 36], ["office", nil], ["tel", nil], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["zip", nil]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 36 LIMIT 1 Started GET "/adherent/members/36/coord" for 127.0.0.1 at 2014-10-11 07:15:51 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"36"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 36 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/show.html.erb within layouts/adherent/application (2.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 11.6ms (Views: 5.7ms | ActiveRecord: 2.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 31], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 31], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 31], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 31], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members" for 127.0.0.1 at 2014-10-11 07:15:51 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 31  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 41 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 41 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 42 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 42 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 43 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 43 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 44 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 44 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 45 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 45 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (33.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39.7ms (Views: 28.2ms | ActiveRecord: 9.3ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Started GET "/adherent/members/41/payments" for 127.0.0.1 at 2014-10-11 07:15:51 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"41"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 41 Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (6.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 67.6ms (Views: 63.5ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 32], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 32], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 32], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 32], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 32], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-11 07:15:51 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 32  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 46 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 46 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 47 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 47 LIMIT 1  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 48 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 48 LIMIT 1  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 49 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 49 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 50 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 50 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (35.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 42.8ms (Views: 30.8ms | ActiveRecord: 8.8ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Started GET "/adherent/members/46/edit" for 127.0.0.1 at 2014-10-11 07:15:51 +0200 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"46"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "46"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (5.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/edit.html.erb within layouts/adherent/application (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14.0ms (Views: 10.8ms | ActiveRecord: 1.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 33], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 33], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (2.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 33], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 33], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-11 07:15:51 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 33  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 51 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 51 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 52 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (1.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 52 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 53 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 53 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 54 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 54 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 55 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 55 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (34.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40.5ms (Views: 27.8ms | ActiveRecord: 10.3ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2014-10-11 07:15:51 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (4.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/new.html.erb within layouts/adherent/application (5.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 10.9ms (Views: 8.3ms | ActiveRecord: 0.7ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 34], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 34], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 34], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 34], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-11 07:15:51 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 34  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 56 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 56 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 57 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 57 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 58 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 58 LIMIT 1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 59 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 59 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 60 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 60 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (32.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39.6ms (Views: 27.5ms | ActiveRecord: 9.4ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Started GET "/adherent/members/56/adhesions" for 127.0.0.1 at 2014-10-11 07:15:51 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"56"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "56"]]  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 56 Redirected to http://www.example.com/adherent/members/56/adhesions/new Completed 302 Found in 5.0ms (ActiveRecord: 1.8ms) Started GET "/adherent/members/56/adhesions/new" for 127.0.0.1 at 2014-10-11 07:15:51 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"56"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "56"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 56 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 56 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (4.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (5.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14.2ms (Views: 8.3ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 35], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 35], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 35], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 35], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 35], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members" for 127.0.0.1 at 2014-10-11 07:15:51 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 35  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 61 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 61 LIMIT 1  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 62 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 62 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 63 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 63 LIMIT 1  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 64 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 64 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 65 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 65 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (34.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40.5ms (Views: 28.1ms | ActiveRecord: 9.9ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" LIMIT 1 Started GET "/adherent/members/61/coord" for 127.0.0.1 at 2014-10-11 07:15:51 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"61"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "61"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 61 LIMIT 1 Redirected to http://www.example.com/adherent/members/61/coord/new Completed 302 Found in 4.6ms (ActiveRecord: 1.7ms) Started GET "/adherent/members/61/coord/new" for 127.0.0.1 at 2014-10-11 07:15:51 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"61"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "61"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 61 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.4ms (Views: 12.0ms | ActiveRecord: 1.7ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/edit.html.erb within layouts/adherent/application (0.3ms) Completed 200 OK in 6.5ms (Views: 1.4ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.1ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.5ms (Views: 1.7ms | ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.1ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.9ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 41], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/66/coord/new Completed 302 Found in 10.7ms (ActiveRecord: 3.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 42], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/67/coord/new Completed 302 Found in 9.9ms (ActiveRecord: 3.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 43], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/68/coord/new Completed 302 Found in 10.9ms (ActiveRecord: 3.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"69"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 69 AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.6ms) UPDATE "adherent_members" SET "name" = 'Dalton', "updated_at" = '2014-10-11 05:15:51.834675' WHERE "adherent_members"."id" = 69  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/69 Completed 302 Found in 12.1ms (ActiveRecord: 3.8ms)  (0.1ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"70"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/70 Completed 302 Found in 5.8ms (ActiveRecord: 1.8ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"71"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.2ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"72"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/72 Completed 302 Found in 6.2ms (ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x6256baa @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5.5ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x626cf40 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5.6ms (ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.5ms (Views: 0.9ms | ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.7ms (Views: 1.8ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 52 Completed 200 OK in 7.6ms (Views: 1.1ms | ActiveRecord: 2.6ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" IS NULL ORDER BY to_date DESC LIMIT 1  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) COMMIT  (0.1ms) BEGIN Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" IS NULL ORDER BY to_date DESC LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" IS NULL ORDER BY to_date DESC LIMIT 1  (0.5ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 73 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 73 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 73], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 73 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 73 ORDER BY to_date DESC LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 74 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 74 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 74], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 74 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 74 ORDER BY to_date DESC LIMIT 1  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 75 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 75 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 75], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 75 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 75 ORDER BY to_date DESC LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" INNER JOIN "adherent_members" ON "adherent_payments"."member_id" = "adherent_members"."id" WHERE "adherent_members"."organism_id" = 53 Completed 200 OK in 18.6ms (Views: 2.2ms | ActiveRecord: 2.8ms)  (0.7ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x662d2c4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.7ms (Views: 1.2ms | ActiveRecord: 2.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x664052c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.1ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x66583d4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x66583d4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5.3ms (ActiveRecord: 1.8ms)  (0.1ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x66856fe @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x66856fe%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 5.9ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x66970a2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.9ms (Views: 1.6ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x66aaed6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.1ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x66c76e4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x66c76e4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 5.7ms (ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x66f0602 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.9ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x67090d0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.8ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x67102e0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.4ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x67217ac @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.3ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x6734f32 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6734f5a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5.7ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x674e950 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.0ms (Views: 2.2ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x6795fda @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (2.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9.3ms (Views: 1.3ms | ActiveRecord: 4.2ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 68], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 68], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 79], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 80], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 80 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 68 LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 80], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 80 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 19 SQL (1.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 19], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 79 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 68 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 79], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 79 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 18 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 18], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 69], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 69], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 81], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 82], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 82 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 69 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 82], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 82 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 21 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 21], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 82 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 69 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 82], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 82 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 21 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 21], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 81 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 69 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 81], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 81 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 20 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 20], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 70], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 70], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 83], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 84], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 84 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 70 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 84], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 84 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 23 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 23], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["payment_id", 12], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 1], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 24  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 24], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 24  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 24  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 1], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 25  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 25], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 1], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 26  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 26], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 26  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) BEGIN SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (120.2ms) COMMIT Adherent::Member Exists (2.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.9ms) BEGIN Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (1.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 71], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (3.4ms) COMMIT Adherent::Member Exists (1.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.6ms) BEGIN Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (1.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 71], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (3.8ms) COMMIT Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 71], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 71], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (3.0ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 71], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 85 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 85 ORDER BY to_date DESC LIMIT 1  (0.3ms) BEGIN SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 85], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:15:52 UTC +00:00]]  (1.7ms) COMMIT Started GET "/adherent/members/85/adhesions" for 127.0.0.1 at 2014-10-11 07:15:57 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"85"} Organism Load (2.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "85"]]  (0.5ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 85 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 85  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 27 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 27 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30.5ms (Views: 10.2ms | ActiveRecord: 14.6ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2014-10-11 07:15:57 +0200 Compiled jquery-ui/theme.css (63ms) (pid 11129) Compiled jquery-ui/core.css (70ms) (pid 11129) Compiled jquery-ui/datepicker.css (82ms) (pid 11129) Compiled adherent/adhesion.css (0ms) (pid 11129) Compiled adherent/allpayments.css (0ms) (pid 11129) Compiled adherent/bootstrap.css (0ms) (pid 11129) Compiled adherent/coords.css (0ms) (pid 11129) Compiled adherent/date_picker.css (2ms) (pid 11129) Compiled adherent/demo_table.css (0ms) (pid 11129) Compiled adherent/jc_application.css (171ms) (pid 11129) Compiled adherent/jcmenu.css (0ms) (pid 11129) Compiled adherent/layouts.css (6ms) (pid 11129) Compiled adherent/members.css (0ms) (pid 11129) Compiled adherent/old_bootstrap.css (0ms) (pid 11129) Compiled adherent/payments.css (0ms) (pid 11129) Compiled adherent/print.css (6ms) (pid 11129) Compiled adherent/reglements.css (0ms) (pid 11129) Compiled adherent/application.css (384ms) (pid 11129) Served asset /adherent/application.css - 200 OK (396ms) Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2014-10-11 07:15:57 +0200 Compiled jquery.js (5ms) (pid 11129) Compiled jquery_ujs.js (0ms) (pid 11129) Compiled jquery-ui/core.js (0ms) (pid 11129) Compiled jquery-ui/datepicker.js (6ms) (pid 11129) Compiled adherent/adhesion.js (0ms) (pid 11129) Compiled adherent/allpayments.js (0ms) (pid 11129) Compiled adherent/bootstrap.js (1ms) (pid 11129) Compiled adherent/coords.js (0ms) (pid 11129) Compiled adherent/date_picker.js (0ms) (pid 11129) Compiled adherent/jquery.dataTables.min.js (2ms) (pid 11129) Compiled adherent/members.js (0ms) (pid 11129) Compiled adherent/payments.js (0ms) (pid 11129) Compiled adherent/reglements.js (0ms) (pid 11129) Compiled adherent/application.js (120ms) (pid 11129) Served asset /adherent/application.js - 200 OK (188ms) Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2014-10-11 07:15:57 +0200 Served asset /adherent/icones/nouveau.png - 200 OK (4ms) Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2014-10-11 07:15:57 +0200 Served asset /adherent/icones/supprimer.png - 200 OK (4ms) Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2014-10-11 07:15:57 +0200 Served asset /adherent/icones/modifier.png - 200 OK (3ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2014-10-11 07:15:57 +0200 Served asset /adherent/icones/users.png - 200 OK (2ms) Started DELETE "/adherent/members/85/adhesions/27" for 127.0.0.1 at 2014-10-11 07:15:58 +0200 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"85", "id"=>"27"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "85"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 85 AND "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "27"]]  (0.1ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 27]]  (125.3ms) COMMIT Redirected to http://127.0.0.1:45798/adherent/members/85/adhesions Completed 302 Found in 142.7ms (ActiveRecord: 127.8ms) Started GET "/adherent/members/85/adhesions" for 127.0.0.1 at 2014-10-11 07:15:58 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"85"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "85"]]  (0.9ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 85 Redirected to http://127.0.0.1:45798/adherent/members/85/adhesions/new Completed 302 Found in 9.2ms (ActiveRecord: 2.9ms) Started GET "/adherent/members/85/adhesions/new" for 127.0.0.1 at 2014-10-11 07:15:58 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"85"} Organism Load (1.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "85"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 85 Adherent::Adhesion Load (1.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 85 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 33.3ms (Views: 20.1ms | ActiveRecord: 5.1ms) Started GET "/assets/adherent/cal.gif" for 127.0.0.1 at 2014-10-11 07:15:58 +0200 Served asset /adherent/cal.gif - 200 OK (3ms)  (1.6ms) SELECT COUNT(*) FROM "adherent_adhesions"   (0.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (2.4ms) select table_name from information_schema.views where table_schema = 'adh_test'  (156.4ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_reglements", "organisms", "adherent_members", "adherent_payments" RESTART IDENTITY CASCADE;  (1.3ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL SQL (1.1ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (1.2ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:15:59 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:15:59 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:15:59 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:15:59 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:15:59 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:15:59 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:15:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:15:59 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  (0.4ms) BEGIN Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 1 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 1 LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:15:59 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Sat, 11 Oct 2014 05:15:59 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (1.4ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2014-10-11 07:15:59 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 1 AND "adherent_payments"."id" = 1 LIMIT 1 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 1 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 39.8ms (Views: 25.8ms | ActiveRecord: 7.5ms) Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2014-10-11 07:15:59 +0200 Served asset /adherent/icones/payment.png - 200 OK (8ms) Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2014-10-11 07:15:59 +0200 Served asset /adherent/icones/imputation.png - 200 OK (11ms) Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2014-10-11 07:15:59 +0200 Served asset /adherent/icones/money-plus.png - 200 OK (5ms) Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2014-10-11 07:15:59 +0200 Served asset /adherent/icones/printer.png - 200 OK (4ms) Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2014-10-11 07:16:00 +0200 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (5.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 1 AND "adherent_payments"."id" = $1 LIMIT 1 [["id", "1"]]  (0.1ms) BEGIN Adherent::Reglement Load (3.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 SQL (0.6ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (156.5ms) COMMIT Redirected to http://127.0.0.1:45798/adherent/members/1/payments Completed 302 Found in 179.0ms (ActiveRecord: 166.6ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2014-10-11 07:16:00 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 1 Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13.3ms (Views: 5.9ms | ActiveRecord: 2.7ms)  (28.3ms) SELECT COUNT(*) FROM "adherent_payments"  (0.6ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (177.5ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_reglements", "organisms", "adherent_members", "adherent_payments" RESTART IDENTITY CASCADE;  (0.9ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (1.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (2.5ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:01 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:01 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:16:01 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:16:01 UTC +00:00]]  (2.1ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:16:01 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:16:01 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:16:01 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members" for 127.0.0.1 at 2014-10-11 07:16:01 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 1  (0.4ms) SHOW max_identifier_length  (2.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 1 LIMIT 1  (1.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 2 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 2 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 3 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 3 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 4 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 4 LIMIT 1  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 5 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 5 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 52.4ms (Views: 35.8ms | ActiveRecord: 14.0ms) Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2014-10-11 07:16:01 +0200 Served asset /adherent/icones/card-address.png - 200 OK (15ms) Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2014-10-11 07:16:01 +0200 Served asset /adherent/icones/bandaid.png - 200 OK (3ms) Started GET "/assets/images/sort_both.png" for 127.0.0.1 at 2014-10-11 07:16:02 +0200 Served asset /images/sort_both.png - 200 OK (3ms) Started GET "/assets/images/sort_asc.png" for 127.0.0.1 at 2014-10-11 07:16:02 +0200 Served asset /images/sort_asc.png - 200 OK (5ms) Started GET "/assets/images/back_disabled.png" for 127.0.0.1 at 2014-10-11 07:16:02 +0200 Served asset /images/back_disabled.png - 200 OK (3ms) Started GET "/assets/images/forward_disabled.png" for 127.0.0.1 at 2014-10-11 07:16:02 +0200 Served asset /images/forward_disabled.png - 200 OK (3ms) Started DELETE "/adherent/members/1" for 127.0.0.1 at 2014-10-11 07:16:02 +0200 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (3.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.1ms) BEGIN Adherent::Coord Load (1.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 1 LIMIT 1 SQL (3.3ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (127.0ms) COMMIT Redirected to http://127.0.0.1:45798/adherent/members Completed 302 Found in 146.3ms (ActiveRecord: 136.2ms) Started GET "/adherent/members" for 127.0.0.1 at 2014-10-11 07:16:02 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = 1  (2.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 2 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 2 LIMIT 1  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 3 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 3 LIMIT 1  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 4 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 4 LIMIT 1  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 5 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 5 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 43.8ms (Views: 29.1ms | ActiveRecord: 10.6ms)  (1.1ms) SELECT COUNT(*) FROM "adherent_members"  (1.1ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (167.7ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_reglements", "organisms", "adherent_members", "adherent_payments" RESTART IDENTITY CASCADE;  (1.0ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members/1/coord/new" for 127.0.0.1 at 2014-10-11 07:16:03 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 1 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.8ms (Views: 13.7ms | ActiveRecord: 2.0ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_coords"  Started POST "/adherent/members/1/coord" for 127.0.0.1 at 2014-10-11 07:16:03 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"1"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 1 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 1], ["office", ""], ["tel", ""], ["updated_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/1/adhesions/new Completed 302 Found in 9.6ms (ActiveRecord: 3.4ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2014-10-11 07:16:03 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 1 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (5.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.9ms (Views: 9.1ms | ActiveRecord: 2.1ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members/2/coord/new" for 127.0.0.1 at 2014-10-11 07:16:03 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"2"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 2 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.6ms (Views: 12.4ms | ActiveRecord: 1.3ms) Started POST "/adherent/members/2/coord" for 127.0.0.1 at 2014-10-11 07:16:03 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"2"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 2 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 2], ["office", ""], ["tel", ""], ["updated_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/2/adhesions/new Completed 302 Found in 8.7ms (ActiveRecord: 3.2ms) Started GET "/adherent/members/2/adhesions/new" for 127.0.0.1 at 2014-10-11 07:16:03 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"2"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 2 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 2 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (5.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.0ms (Views: 8.7ms | ActiveRecord: 2.4ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Started GET "/adherent/members/3/coord/new" for 127.0.0.1 at 2014-10-11 07:16:03 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"3"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 3 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.8ms (Views: 11.5ms | ActiveRecord: 1.6ms) Started POST "/adherent/members/3/coord" for 127.0.0.1 at 2014-10-11 07:16:03 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"3"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 3 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 3], ["office", ""], ["tel", ""], ["updated_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00], ["zip", ""]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/3/adhesions/new Completed 302 Found in 8.8ms (ActiveRecord: 3.3ms) Started GET "/adherent/members/3/adhesions/new" for 127.0.0.1 at 2014-10-11 07:16:03 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"3"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 3 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 3 ORDER BY to_date DESC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (5.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15.5ms (Views: 9.4ms | ActiveRecord: 2.5ms) Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 3 LIMIT 1  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Sat, 11 Oct 2014 05:16:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Started GET "/adherent/members/4/coord/new" for 127.0.0.1 at 2014-10-11 07:16:03 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 4 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.2ms (Views: 12.7ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 5], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 5], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 5], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 5 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 5 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 5], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/5/payments/new" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"5"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 5 LIMIT 1 Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 5 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.1ms) Completed 200 OK in 96.2ms (Views: 82.4ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/5/payments" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"11/10/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"5"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 5 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 5 LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 5], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 5 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 1 SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 1], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/5/payments Completed 302 Found in 19.7ms (ActiveRecord: 6.8ms) Started GET "/adherent/members/5/payments" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"5"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 5 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Adherent::Adhesion Load (1.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 1 LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 5 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 5 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (20.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35.2ms (Views: 26.1ms | ActiveRecord: 7.2ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 5 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 1  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 6], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 6], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 6], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 8 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 8 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 8], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/8/payments/new" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"8"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 6 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 8 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 2 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 18.6ms (Views: 9.0ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/8/payments" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"11/10/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"8"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 8 LIMIT 1 Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 6 LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 8], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 8 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 2 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 2], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["payment_id", 2], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/8/payments Completed 302 Found in 17.8ms (ActiveRecord: 7.0ms) Started GET "/adherent/members/8/payments" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"8"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 8 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 2 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 2 LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 8 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 2  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 2 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 2 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 2 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 8 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 20.9ms (Views: 13.7ms | ActiveRecord: 5.5ms)  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 8 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 7], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 7], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 7], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 11 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 11 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 11], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/11/payments/new" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"11"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 7 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 11 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 3 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.8ms (Views: 9.0ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/11/payments" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"11/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"11"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 11 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 7 LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 11], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 11 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 3 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 3], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["payment_id", 3], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/11/payments Completed 302 Found in 17.1ms (ActiveRecord: 6.2ms) Started GET "/adherent/members/11/payments" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"11"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 11 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 3 LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 11 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 11 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.4ms (Views: 13.0ms | ActiveRecord: 5.5ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 11 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 12 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 12 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 12], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 13 Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 13 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 13], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/3/reglements/new" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"3"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (4.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 11 LIMIT 1 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 3 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 12 LIMIT 1  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 4 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 13 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 5 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 38.7ms (Views: 20.9ms | ActiveRecord: 12.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (2.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 8], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 8], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 8], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 14 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 14 ORDER BY to_date DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 14], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/14/payments/new" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"14"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 8 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 14 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 6 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.7ms (Views: 8.1ms | ActiveRecord: 3.6ms) Started POST "/adherent/members/14/payments" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"11/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"14"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 14 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 8 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 14], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 14 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 6 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 6], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["payment_id", 4], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/14/payments Completed 302 Found in 17.2ms (ActiveRecord: 6.0ms) Started GET "/adherent/members/14/payments" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"14"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 14 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 4 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 6 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 14 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 4  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 4 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 4 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 4 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 14 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.6ms (Views: 14.4ms | ActiveRecord: 5.2ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 14 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 15 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 15 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 15], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 16 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 16 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 16], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/4/reglements/new" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"4"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 14 LIMIT 1 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 4  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 4 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 4 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 4 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 16 LIMIT 1  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 8 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 15 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 7 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 26.1ms (Views: 14.3ms | ActiveRecord: 7.3ms)  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 9], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 9], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 9], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 17 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 17 ORDER BY to_date DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 17], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/17/payments/new" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"17"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 9 LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 17 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 9 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.9ms (Views: 9.2ms | ActiveRecord: 3.6ms) Started POST "/adherent/members/17/payments" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"11/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"17"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 17 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 9 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 17], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 17 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 9 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 9], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["payment_id", 5], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/17/payments Completed 302 Found in 18.3ms (ActiveRecord: 6.8ms) Started GET "/adherent/members/17/payments" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"17"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 17 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 9 LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 17 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 17 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22.2ms (Views: 14.6ms | ActiveRecord: 5.8ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 17 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 18 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 18 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 18], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 19 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 19 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 19], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/5/reglements/new" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"5"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 17 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 5 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 19 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 11 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 18 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 10 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25.8ms (Views: 14.2ms | ActiveRecord: 7.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 10], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 10], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 10], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 20 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 20 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 20], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/20/payments/new" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"20"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "20"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 10 LIMIT 1 Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 20 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 12 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 19.3ms (Views: 10.1ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/20/payments" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"11/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"20"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "20"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 20 LIMIT 1 Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 10 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 20], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 20 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 12 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 12], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["payment_id", 6], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/20/payments Completed 302 Found in 17.4ms (ActiveRecord: 6.2ms) Started GET "/adherent/members/20/payments" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"20"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "20"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 20 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 12 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 20 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 20 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.8ms (Views: 14.1ms | ActiveRecord: 5.1ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 20 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 21 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 21 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 21], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 22 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 22 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 22], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/6/reglements/new" for 127.0.0.1 at 2014-10-11 07:16:04 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"6"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "6"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 20 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 21 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 13 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 22 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 14 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25.6ms (Views: 14.4ms | ActiveRecord: 6.5ms) Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 20 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 20 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 6  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 11], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 11], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 11], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 23 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 23 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 23], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/23/payments/new" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"23"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 11 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 23 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 15 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.1ms (Views: 8.4ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/23/payments" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"11/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"23"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 23 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 11 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 23], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 23 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 15 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 15], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/23/payments Completed 302 Found in 18.5ms (ActiveRecord: 6.3ms) Started GET "/adherent/members/23/payments" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"23"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 23 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 15 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 23 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 23 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22.4ms (Views: 15.2ms | ActiveRecord: 5.4ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 23 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 24 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 24 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 24], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 25 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 25 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 25], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/7/reglements/new" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"7"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 23 LIMIT 1 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 25 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 17 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 24 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 16 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27.5ms (Views: 15.8ms | ActiveRecord: 6.4ms) Started POST "/adherent/payments/7/reglements" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"16"}, "commit"=>"Enregistrer", "payment_id"=>"7"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 16  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 16], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 23 LIMIT 1 Redirected to http://www.example.com/adherent/members/23/payments Completed 302 Found in 13.1ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/23/payments" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"23"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 23 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 15 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 23 LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 16 LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 24 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 7 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 23 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (61.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 71.1ms (Views: 63.0ms | ActiveRecord: 6.9ms) Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 12], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 12], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 12], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 26 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 26 ORDER BY to_date DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 26], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/26/payments/new" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"26"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 12 LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 26 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 18 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.7ms (Views: 8.9ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/26/payments" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"11/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"26"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 26 LIMIT 1 Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 12 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 26], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 26 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 18 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 18], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/26/payments Completed 302 Found in 18.2ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/26/payments" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"26"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 26 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 18 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 26 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 26 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23.3ms (Views: 14.4ms | ActiveRecord: 6.0ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 26 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 27 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 27 ORDER BY to_date DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 27], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 28 Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 28 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 28], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/8/reglements/new" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"8"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 26 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 28 LIMIT 1  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 20 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 27 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 19 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26.3ms (Views: 15.2ms | ActiveRecord: 6.7ms) Started POST "/adherent/payments/8/reglements" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"19"}, "commit"=>"Enregistrer", "payment_id"=>"8"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "19"]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 19  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 19], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 26 LIMIT 1 Redirected to http://www.example.com/adherent/members/26/payments Completed 302 Found in 13.3ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/26/payments" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"26"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 26 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 18 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 26 LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 19 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 27 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 8 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 26 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 26.0ms (Views: 18.8ms | ActiveRecord: 5.4ms) Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 19 LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 27 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 13], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 13], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 13], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 29 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 29 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 29], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/29/payments/new" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"29"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 13 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 29 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 21 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.5ms (Views: 8.9ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/29/payments" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"11/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"29"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 29 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 13 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 29], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 29 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 21 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 21], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/29/payments Completed 302 Found in 17.6ms (ActiveRecord: 6.1ms) Started GET "/adherent/members/29/payments" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"29"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 29 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 21 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 29 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 29 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 21.2ms (Views: 14.2ms | ActiveRecord: 5.2ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 29 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 30 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 30 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 30], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 31 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 31 ORDER BY to_date DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 31], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/9/reglements/new" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"9"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 29 LIMIT 1 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 31 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 23 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 30 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 22 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33.3ms (Views: 18.2ms | ActiveRecord: 7.7ms) Started POST "/adherent/payments/9/reglements" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"22"}, "commit"=>"Enregistrer", "payment_id"=>"9"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "22"]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 22  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 22], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 29 LIMIT 1 Redirected to http://www.example.com/adherent/members/29/payments Completed 302 Found in 12.6ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/29/payments" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"29"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 29 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 21 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 29 LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 22 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 30 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 9 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 29 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25.4ms (Views: 17.5ms | ActiveRecord: 6.2ms) Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 30 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 22  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 14], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 14], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 32 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 32 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 32], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/32/payments/new" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"32"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 14 LIMIT 1 Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 32 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 24 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 18.0ms (Views: 8.5ms | ActiveRecord: 3.5ms) Started POST "/adherent/members/32/payments" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"11/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"32"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 32 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 14 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 32], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 32 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 24 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 24], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/32/payments Completed 302 Found in 18.3ms (ActiveRecord: 6.1ms) Started GET "/adherent/members/32/payments" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"32"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 32 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 24 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 32 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 32 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22.1ms (Views: 14.6ms | ActiveRecord: 5.7ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 32 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 33 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 33 ORDER BY to_date DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 33], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 34 Adherent::Adhesion Load (1.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 34 ORDER BY to_date DESC LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 34], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:05 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/10/reglements/new" for 127.0.0.1 at 2014-10-11 07:16:05 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"10"} Organism Load (1.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 32 LIMIT 1 Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10  (2.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 33 LIMIT 1  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 25 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 34 LIMIT 1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 26 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32.1ms (Views: 16.0ms | ActiveRecord: 10.6ms) Started POST "/adherent/payments/10/reglements" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"25"}, "commit"=>"Enregistrer", "payment_id"=>"10"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "25"]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 25  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 25], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 32 LIMIT 1 Redirected to http://www.example.com/adherent/members/32/payments Completed 302 Found in 15.7ms (ActiveRecord: 6.3ms) Started GET "/adherent/members/32/payments" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"32"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 32 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 24 LIMIT 1 Adherent::Member Load (68.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 32 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 25 LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 33 LIMIT 1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 10 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 32 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (87.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 95.8ms (Views: 18.5ms | ActiveRecord: 75.7ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 24 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 32 LIMIT 1  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 15], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 15], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 35 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 35 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 35], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/35/payments/new" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"35"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 15 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 35 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 27 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.5ms (Views: 9.6ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/35/payments" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"11/10/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"35"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 35 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 15 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 35], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 35 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 27 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 27], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/35/payments Completed 302 Found in 18.5ms (ActiveRecord: 6.4ms) Started GET "/adherent/members/35/payments" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"35"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 35 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 27 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 35 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 35 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.0ms (Views: 13.9ms | ActiveRecord: 5.3ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 35 ORDER BY "adherent_payments"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 36 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 36 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 36], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 37 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 37 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 37], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/11/reglements/new" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"11"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 35 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 36 LIMIT 1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 28 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 37 LIMIT 1  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 29 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27.3ms (Views: 15.4ms | ActiveRecord: 7.2ms) Started POST "/adherent/payments/11/reglements" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"28"}, "commit"=>"Enregistrer", "payment_id"=>"11"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "28"]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 28  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 28], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 35 LIMIT 1 Redirected to http://www.example.com/adherent/members/35/payments Completed 302 Found in 12.9ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/35/payments" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"35"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 35 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 27 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 35 LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 28 LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 36 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 11 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 35 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24.2ms (Views: 15.6ms | ActiveRecord: 7.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 16], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 16], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 16], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 38 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 38 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 38], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/38/payments/new" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"38"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 16 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 38 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 30 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 18.9ms (Views: 9.9ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/38/payments" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"11/10/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"38"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 38 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 16 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 38], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 38 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 30 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 30], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["payment_id", 12], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/38/payments Completed 302 Found in 17.4ms (ActiveRecord: 6.1ms) Started GET "/adherent/members/38/payments" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"38"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 38 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 12 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 30 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 38 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 12  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 12 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 12 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 12 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 38 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 20.4ms (Views: 13.1ms | ActiveRecord: 5.1ms) Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 38 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 30  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 17], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 17], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 17], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 41 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 41 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 41], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (2.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/41/payments/new" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"41"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 17 LIMIT 1 Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 41 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 31 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 20.4ms (Views: 8.2ms | ActiveRecord: 4.7ms) Started POST "/adherent/members/41/payments" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"11/10/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"41"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 41 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 17 LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 41], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 41 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 31 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 31], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["payment_id", 13], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/41/payments Completed 302 Found in 17.4ms (ActiveRecord: 6.3ms) Started GET "/adherent/members/41/payments" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"41"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 41 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 13 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 31 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 41 LIMIT 1 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 13  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 13 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 13 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 13 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 41 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.4ms (Views: 13.7ms | ActiveRecord: 5.9ms)  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 41 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 18], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 18], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 44 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 44 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 44], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/44/payments/new" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"44"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "44"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 18 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 44 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 32 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.5ms (Views: 8.5ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/44/payments" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"11/10/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"44"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "44"]]  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 44 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 18 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 44], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 44 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 32 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 32], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["payment_id", 14], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/44/payments Completed 302 Found in 84.8ms (ActiveRecord: 6.8ms) Started GET "/adherent/members/44/payments" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"44"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "44"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 44 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 14 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 32 LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 44 LIMIT 1 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 14  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 14 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 14 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 14 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 44 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26.0ms (Views: 19.1ms | ActiveRecord: 4.8ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"   (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 19], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 19], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 47 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 47 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 47], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/47/payments/new" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"47"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 19 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 47 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 33 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18.2ms (Views: 8.8ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/47/payments" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"11/10/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"47"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 47 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 19 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 47], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 47 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 33 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 33], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["payment_id", 15], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/47/payments Completed 302 Found in 18.0ms (ActiveRecord: 5.6ms) Started GET "/adherent/members/47/payments" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"47"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 47 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 15 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 33 LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 47 LIMIT 1 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 15  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 15 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 15 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 15 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 47 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.9ms (Views: 13.5ms | ActiveRecord: 5.6ms)  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 47 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 20], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 20], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 50 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 50 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 50], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 50 Started GET "/adherent/members/50/payments/new" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"50"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "50"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 20 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 50 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 34 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.2ms (Views: 8.6ms | ActiveRecord: 3.2ms) Started POST "/adherent/members/50/payments" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"11/10/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"50"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "50"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 50 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 20 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 50], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 50 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 34 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 34], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00], ["payment_id", 16], ["updated_at", Sat, 11 Oct 2014 05:16:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/50/payments Completed 302 Found in 17.3ms (ActiveRecord: 6.7ms) Started GET "/adherent/members/50/payments" for 127.0.0.1 at 2014-10-11 07:16:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"50"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "50"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 50 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 16 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = 34 LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 50 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 16  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 16 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 16 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 16 CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 50 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.1ms (Views: 13.6ms | ActiveRecord: 5.7ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 50  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x66958b0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.0ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x66a7dd0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x66a725e @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.2ms (Views: 1.5ms | ActiveRecord: 1.9ms)  (1.0ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"11/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x66c133e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x66c133e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6.0ms (ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"11/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x66f4b30 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.5ms (Views: 1.0ms | ActiveRecord: 2.5ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"11/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x670b6be @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x670b6be%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5.7ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6715132 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.9ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x67244ca @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.0ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.4ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", nil], ["city", "Lille"], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["gsm", nil], ["mail", nil], ["member_id", 53], ["office", nil], ["tel", nil], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["zip", 59000]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = 53 LIMIT 1  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"   (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 4]] SQL (0.7ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 53]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"   (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 54], ["to_date", Tue, 11 Nov 2014], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 54 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 54 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["from_date", Wed, 12 Nov 2014], ["member_id", 54], ["to_date", Wed, 11 Nov 2015], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 54 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 28 LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 54], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 54 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 35 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 35], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["payment_id", 17], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"   (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 55], ["to_date", Tue, 11 Nov 2014], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 55 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 55 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["from_date", Wed, 12 Nov 2014], ["member_id", 55], ["to_date", Wed, 11 Nov 2015], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 55 LIMIT 1 Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 29 LIMIT 1  (0.4ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 56], ["to_date", Tue, 11 Nov 2014], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 56 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 56 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["from_date", Wed, 12 Nov 2014], ["member_id", 56], ["to_date", Wed, 11 Nov 2015], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_payments"   (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 56 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 30 LIMIT 1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"   (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 57], ["to_date", Tue, 11 Nov 2014], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 57 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 57 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["from_date", Wed, 12 Nov 2014], ["member_id", 57], ["to_date", Wed, 11 Nov 2015], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 57 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 31 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 57], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 57 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 41 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 41], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["payment_id", 18], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 42 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 42], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["payment_id", 18], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 18  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 18  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 32], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members"  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 58], ["to_date", Tue, 11 Nov 2014], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 58 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 58 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["from_date", Wed, 12 Nov 2014], ["member_id", 58], ["to_date", Wed, 11 Nov 2015], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 58 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 32 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 58], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 58 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 43 SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 43], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = 44 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 44], ["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_reglements"   (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" IS NULL  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 59 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 59 ORDER BY to_date DESC LIMIT 1  (2.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 59], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 59 LIMIT 1 Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 33 LIMIT 1 SQL (48.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 59], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]] Adherent::Adhesion Load (3.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 59 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.6ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/59/payments" for 127.0.0.1 at 2014-10-11 07:16:07 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"59"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "59"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 59 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 20 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 20  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 20 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 20 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 20 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 59 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.3ms (Views: 12.7ms | ActiveRecord: 5.2ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 60 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 60 ORDER BY to_date DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 60], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 60 LIMIT 1 Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 34 LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 60], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 60 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/60/payments" for 127.0.0.1 at 2014-10-11 07:16:07 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"60"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "60"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 60 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 60 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19.5ms (Views: 12.4ms | ActiveRecord: 4.9ms) Started GET "/adherent/payments/21/reglements/new" for 127.0.0.1 at 2014-10-11 07:16:07 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"21"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "21"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 60 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 21 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (7.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21.8ms (Views: 11.9ms | ActiveRecord: 4.8ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 35], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 61 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 61 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 61], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 61 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 35 LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 61], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 61 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/61/payments/22" for 127.0.0.1 at 2014-10-11 07:16:07 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"61", "id"=>"22"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "61"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 61 AND "adherent_payments"."id" = 22 LIMIT 1 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 61 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 22 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (5.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29.4ms (Views: 21.1ms | ActiveRecord: 5.1ms) SQL (0.7ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 36], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 62 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 62 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 62], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 62 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 36 LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 62], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 62 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/62/payments/23" for 127.0.0.1 at 2014-10-11 07:16:07 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"62", "id"=>"23"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "62"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 62 AND "adherent_payments"."id" = 23 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 62 LIMIT 1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 23 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.2ms (Views: 12.5ms | ActiveRecord: 4.4ms) SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 37], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 63 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 63 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 63], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 63 LIMIT 1 Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 37 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 63], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 63 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/63/payments/24" for 127.0.0.1 at 2014-10-11 07:16:07 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"63", "id"=>"24"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "63"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 63 AND "adherent_payments"."id" = 24 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 63 LIMIT 1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 24 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20.3ms (Views: 12.2ms | ActiveRecord: 4.8ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 38], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 64 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 64 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 64], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/64/payments/new" for 127.0.0.1 at 2014-10-11 07:16:07 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"64"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "64"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 38 LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 64 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 16.8ms (Views: 8.8ms | ActiveRecord: 2.3ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 39], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members"  Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 65 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 65 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 65], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/65/payments/new" for 127.0.0.1 at 2014-10-11 07:16:07 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"65"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "65"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 39 LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 65 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 16.2ms (Views: 8.8ms | ActiveRecord: 2.7ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 40], ["updated_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 66 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 66 ORDER BY to_date DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 66], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/66/payments/new" for 127.0.0.1 at 2014-10-11 07:16:08 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"66"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "66"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 40 LIMIT 1 Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 66 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 16.9ms (Views: 8.9ms | ActiveRecord: 2.9ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 66 Started POST "/adherent/members/66/payments" for 127.0.0.1 at 2014-10-11 07:16:08 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"11/10/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"66"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "66"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 66 LIMIT 1 Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 40 LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00], ["date", Sat, 11 Oct 2014], ["member_id", 66], ["mode", "CB"], ["updated_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 66 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/66/payments Completed 302 Found in 13.0ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/66/payments" for 127.0.0.1 at 2014-10-11 07:16:08 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"66"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "66"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 66 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = 25 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = 66 LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17.6ms (Views: 10.9ms | ActiveRecord: 4.5ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = 66 SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (48.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", nil], ["created_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 41], ["updated_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 67 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = 67 ORDER BY to_date DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00], ["from_date", Sat, 11 Oct 2014], ["member_id", 67], ["to_date", Sat, 10 Oct 2015], ["updated_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/67/payments/new" for 127.0.0.1 at 2014-10-11 07:16:08 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"67"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "67"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = 41 LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = 67 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY to_date Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (4.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16.5ms (Views: 8.0ms | ActiveRecord: 2.8ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x67cf9d8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7.7ms (Views: 1.9ms | ActiveRecord: 2.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"11/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x67d9212 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x67d9212%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5.9ms (ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"11/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x69229f2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10.5ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"11/10/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x696e85c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x696e85c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6.0ms (ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x68120e4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x68120e4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7.5ms (ActiveRecord: 3.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x69a7918 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.1ms (Views: 1.5ms | ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.6ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x69bd1fa @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.2ms (Views: 1.1ms | ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x69d1646 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x69d1646%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5.8ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x69e84d6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.9ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x69fb036 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5.6ms (Views: 0.9ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x69e1730 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x69e1730%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 71.1ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x571409e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.9ms (Views: 1.5ms | ActiveRecord: 2.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5bf069e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "organisms" ("created_at", "status", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00], ["status", nil], ["title", "Mon association"], ["updated_at", Sat, 11 Oct 2014 05:16:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6.9ms (Views: 1.1ms | ActiveRecord: 2.8ms)  (0.4ms) ROLLBACK  (1.5ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x61d3de0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (20.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.7ms) SAVEPOINT active_record_1 SQL (129.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/edit.html.erb within layouts/adherent/application (1.0ms) Completed 200 OK in 343ms (Views: 107.3ms | ActiveRecord: 156.7ms)  (1.4ms) ROLLBACK  (4.0ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x641124c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.8ms) SAVEPOINT active_record_1 SQL (2.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 2.2ms | ActiveRecord: 5.0ms)  (0.7ms) ROLLBACK  (0.6ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6439fd0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6439fd0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6457f9e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6457f9e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 7ms (ActiveRecord: 2.7ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x646f842 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64821cc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x649adc6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 4.5ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x64b2b42 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x64d1ec0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.8ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x64d1ec0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 7ms (ActiveRecord: 2.7ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64e8418 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:30:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 23ms (Views: 17.1ms | ActiveRecord: 1.9ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x65005fe @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:30:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:30:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (55.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 66], ["updated_at", Sat, 27 Dec 2014 06:30:53 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (2.2ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (1.4ms) SAVEPOINT active_record_1 SQL (40.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:30:53 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 68], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:30:53 UTC +00:00]]  (1.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/68/adhesions" for 127.0.0.1 at 2014-12-27 07:30:53 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"68"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]] Adherent::Adhesion Exists (1.1ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 68]] Adherent::Adhesion Load (3.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 68]] Completed 500 Internal Server Error in 213ms SQL (1.9ms) DELETE FROM "adherent_members"  (2.1ms) ROLLBACK  (1.3ms) BEGIN SQL (1.9ms) DELETE FROM "adherent_members" Organism Load (5.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (1.0ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:30:53 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1  (1.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 67], ["updated_at", Sat, 27 Dec 2014 06:30:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:30:53 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 69], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:30:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/69/adhesions" for 127.0.0.1 at 2014-12-27 07:30:53 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"69"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "69"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 69]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 69]]  (21.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (2.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (3.8ms) Completed 200 OK in 5237ms (Views: 5203.8ms | ActiveRecord: 27.0ms) Started GET "/adherent/members/69/payments/new" for 127.0.0.1 at 2014-12-27 07:30:59 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"69"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "69"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 67]] Adherent::Adhesion Load (30.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL)  (1.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (90.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 243ms (Views: 145.3ms | ActiveRecord: 37.0ms) SQL (2.0ms) DELETE FROM "adherent_members"  (1.6ms) ROLLBACK  (0.3ms) BEGIN SQL (2.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 68], ["updated_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 70], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/70/adhesions" for 127.0.0.1 at 2014-12-27 07:30:59 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"70"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 70]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 70]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 56]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 56]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 7.5ms | ActiveRecord: 3.1ms) Started GET "/adherent/members/70/adhesions/56/edit" for 127.0.0.1 at 2014-12-27 07:30:59 +0100 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"70", "id"=>"56"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (3.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 70], ["id", "56"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 67ms (Views: 56.1ms | ActiveRecord: 4.9ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 69], ["updated_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/71/adhesions/new" for 127.0.0.1 at 2014-12-27 07:30:59 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"71"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 71]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 71]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 45ms (Views: 37.5ms | ActiveRecord: 3.0ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 71]] Started POST "/adherent/members/71/adhesions" for 127.0.0.1 at 2014-12-27 07:30:59 +0100 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"71"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 71], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/71/adhesions Completed 302 Found in 9ms (ActiveRecord: 2.9ms) Started GET "/adherent/members/71/adhesions" for 127.0.0.1 at 2014-12-27 07:30:59 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"71"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 71]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 71]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 57]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 57]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 7.4ms | ActiveRecord: 2.8ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 71]] SQL (0.3ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 70], ["updated_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/72/adhesions/new" for 127.0.0.1 at 2014-12-27 07:30:59 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"72"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "72"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 72]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 72]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.3ms | ActiveRecord: 3.0ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.7ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 73]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 73]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 73], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 73]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 73]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 74]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 74]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 74], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 74]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 74]]  (0.1ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.4ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 75]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 75]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 75], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 75]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 75]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.5ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.5ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x653c1f8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x6540bae @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 32ms (Views: 27.2ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x6569c84 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:30:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x6587fea @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (2.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6587fea%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 7ms (ActiveRecord: 3.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x65a7a8e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x65a7a8e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x65c5520 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x65dc496 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 17ms (Views: 10.1ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x65f4488 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK SQL (1.6ms) DELETE FROM "adherent_members" Organism Load (2.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (1.2ms) BEGIN SQL (2.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00]]  (9.1ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 78) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 78) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 78], ["updated_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00]]  (9.9ms) COMMIT Adherent::Member Exists (3.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 78) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 78) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 78], ["updated_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00]]  (3.5ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 78) LIMIT 1  (4.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 78) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 78], ["updated_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00]]  (15.7ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 78) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 78) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 78], ["updated_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00]]  (28.6ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 78) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (2.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 78) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 78], ["updated_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00]]  (3.9ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) BEGIN Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 79]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 78]] SQL (92.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 79], ["mode", "Chèque"], ["updated_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (641.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00], ["payment_id", 26], ["updated_at", Sat, 27 Dec 2014 06:31:00 UTC +00:00]]  (284.8ms) COMMIT Started GET "/adherent/members/79/payments/26" for 127.0.0.1 at 2014-12-27 07:31:14 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"79", "id"=>"26"} Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "79"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 26 LIMIT 1 [["member_id", 79]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]]  (3.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 79]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 55]] Completed 500 Internal Server Error in 80ms  (9.6ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (110.7ms) select table_name from information_schema.views where table_schema = 'adh_test'  (200.0ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "organisms", "adherent_members", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) BEGIN SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:15 UTC +00:00]]  (6.9ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:15 UTC +00:00]]  (8.5ms) COMMIT Adherent::Member Exists (3.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:15 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:15 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:15 UTC +00:00]]  (2.2ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:15 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.4ms) BEGIN SQL (3.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:15 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:15 UTC +00:00]]  (1.6ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2014-12-27 07:31:15 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 9.1ms | ActiveRecord: 3.4ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2014-12-27 07:31:15 +0100 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2014-12-27 07:31:15 +0100 Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2014-12-27 07:31:15 +0100 Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2014-12-27 07:31:15 +0100 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2014-12-27 07:31:15 +0100 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2014-12-27 07:31:15 +0100 Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2014-12-27 07:31:16 +0100 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (4.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (1.9ms) BEGIN SQL (2.3ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (17.6ms) COMMIT Redirected to http://127.0.0.1:43489/adherent/members/1/adhesions Completed 302 Found in 38ms (ActiveRecord: 28.0ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2014-12-27 07:31:16 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (2.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:43489/adherent/members/1/adhesions/new Completed 302 Found in 11ms (ActiveRecord: 3.8ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2014-12-27 07:31:16 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.3ms | ActiveRecord: 2.2ms) Started GET "/assets/adherent/cal.gif" for 127.0.0.1 at 2014-12-27 07:31:16 +0100  (2.5ms) SELECT COUNT(*) FROM "adherent_adhesions"  (2.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (5.2ms) select table_name from information_schema.views where table_schema = 'adh_test'  (126.7ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) BEGIN SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:17 UTC +00:00]]  (2.1ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:17 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:17 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:17 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:17 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:17 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:31:17 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 98ms (Views: 86.3ms | ActiveRecord: 5.9ms) Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2014-12-27 07:31:18 +0100 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2014-12-27 07:31:18 +0100 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2014-12-27 07:31:18 +0100 Started GET "/assets/images/sort_asc.png" for 127.0.0.1 at 2014-12-27 07:31:18 +0100 Started GET "/assets/images/sort_both.png" for 127.0.0.1 at 2014-12-27 07:31:18 +0100 Started GET "/assets/images/forward_disabled.png" for 127.0.0.1 at 2014-12-27 07:31:18 +0100 Started GET "/assets/images/back_disabled.png" for 127.0.0.1 at 2014-12-27 07:31:18 +0100 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2014-12-27 07:31:18 +0100 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.1ms) BEGIN Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] SQL (3.1ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (71.1ms) COMMIT Redirected to http://127.0.0.1:43489/adherent/members Completed 302 Found in 97ms (ActiveRecord: 77.1ms) Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:31:18 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]] Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 20.3ms | ActiveRecord: 15.4ms)  (2.0ms) SELECT COUNT(*) FROM "adherent_members"  (1.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (149.5ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "organisms", "adherent_members", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (1.5ms) DELETE FROM "adherent_members" Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (2.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 1], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_payments"  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]]  (0.5ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_payments"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 2], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 2]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 2]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 2], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 2]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 2]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 2], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 3], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 3]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 3]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 3], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 3]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 3]] SQL (1.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 3], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["payment_id", 2], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (1.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 4], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 4]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 4], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 4]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 4]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 5], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 5], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 5]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 5], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 5]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 5], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["payment_id", 3], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x65e6d88 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x6605558 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.0ms | ActiveRecord: 1.6ms)  (0.7ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x663bbee @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x663bbee%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 8ms (ActiveRecord: 2.4ms)  (0.7ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x666a700 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x666a700%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6b71da2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6b79048 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.6ms | ActiveRecord: 2.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6b8023a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (1.0ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x6b8ae2e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (1.9ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Unpermitted parameters: mode, date Completed 200 OK in 13ms (Views: 2.1ms | ActiveRecord: 3.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x6b9ac5c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Unpermitted parameters: mode, date Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6b9ac5c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x6ba78f8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Unpermitted parameters: mode, date Completed 500 Internal Server Error in 7ms  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6bb1b28 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.0ms | ActiveRecord: 3.6ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6bb85a4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6bb85a4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6bcf8d0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.3ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.6ms) BEGIN  (0.6ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["member_id", 6], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["zip", 59000]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 6]]  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 1]] SQL (0.8ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 6]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) COMMIT  (0.5ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:31:20 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 19]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 7]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 8]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 9]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 10]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 11]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 21.6ms | ActiveRecord: 3.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:31:20 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 20]] Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 12]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 13]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 14]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 15]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 22.3ms | ActiveRecord: 4.3ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 06:31:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2014-12-27 07:31:20 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (42.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 740ms (Views: 735.9ms | ActiveRecord: 0.8ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2014-12-27 07:31:21 +0100 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/22/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.6ms) Started GET "/adherent/members/22/coord/new" for 127.0.0.1 at 2014-12-27 07:31:21 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"22"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "22"]] Adherent::Coord Load (1.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 66ms (Views: 57.6ms | ActiveRecord: 3.4ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:31:21 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 22]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 23]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 24]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 25]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 26]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 22.7ms | ActiveRecord: 4.6ms) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/23/adhesions" for 127.0.0.1 at 2014-12-27 07:31:21 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"23"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]] Adherent::Adhesion Exists (0.9ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 23]] Redirected to http://www.example.com/adherent/members/23/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.9ms) Started GET "/adherent/members/23/adhesions/new" for 127.0.0.1 at 2014-12-27 07:31:21 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"23"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 23]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 23]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (13.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 16.1ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.9ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:31:21 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 23]] Adherent::Coord Load (1.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 28]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 29]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 30]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 31]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 24.2ms | ActiveRecord: 6.4ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2014-12-27 07:31:21 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (83.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 90ms (Views: 85.9ms | ActiveRecord: 0.6ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:31:21 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 24]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 33]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 34]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 35]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 36]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 20.6ms | ActiveRecord: 3.3ms) Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/33/edit" for 127.0.0.1 at 2014-12-27 07:31:21 +0100 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"33"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "33"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 58ms (Views: 54.9ms | ActiveRecord: 1.3ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (1.9ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 06:31:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:31:21 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 25]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 38]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 39]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 40]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 41]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 42]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 18.9ms | ActiveRecord: 3.7ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/38/payments" for 127.0.0.1 at 2014-12-27 07:31:22 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"38"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 38]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 12ms (Views: 6.9ms | ActiveRecord: 2.5ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:31:22 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 26]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 43]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 44]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 45]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 46]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 47]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 22.1ms | ActiveRecord: 4.7ms) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["member_id", 43], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 43]] Started GET "/adherent/members/43/coord" for 127.0.0.1 at 2014-12-27 07:31:22 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"43"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "43"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 43]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 10ms (Views: 4.3ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:31:22 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 27]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 48]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 49]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 50]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 51]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 52]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 22.7ms | ActiveRecord: 3.6ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 48]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 48]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 48], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/48/adhesions" for 127.0.0.1 at 2014-12-27 07:31:22 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"48"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "48"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 48]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 48]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 84ms (Views: 79.0ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:31:22 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 28]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 53]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 54]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 55]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 56]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 57]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 22.2ms | ActiveRecord: 3.9ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/53/coord" for 127.0.0.1 at 2014-12-27 07:31:22 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"53"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "53"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 53]] Redirected to http://www.example.com/adherent/members/53/coord/new Completed 302 Found in 5ms (ActiveRecord: 1.9ms) Started GET "/adherent/members/53/coord/new" for 127.0.0.1 at 2014-12-27 07:31:22 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"53"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "53"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 53]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 19.9ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) COMMIT  (0.6ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 12], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 13], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]]  (0.6ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 14], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.8ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 29], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 58], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 59], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 59]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 59], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["payment_id", 4], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 59]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 59], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["payment_id", 5], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 58]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 58], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["payment_id", 6], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 30], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 60], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 61], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 61]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 30]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 61], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 60]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 30]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 60], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 62], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 63], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 63]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 31]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 63], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/64/coord/new" for 127.0.0.1 at 2014-12-27 07:31:22 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"64"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "64"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 64]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (25.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 36ms (Views: 28.7ms | ActiveRecord: 2.0ms) Started POST "/adherent/members/64/coord" for 127.0.0.1 at 2014-12-27 07:31:22 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"64"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "64"]] Completed 500 Internal Server Error in 4ms  (0.6ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (1.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/65/coord/new" for 127.0.0.1 at 2014-12-27 07:31:22 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"65"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "65"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 65]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 20.4ms | ActiveRecord: 1.7ms) Started POST "/adherent/members/65/coord" for 127.0.0.1 at 2014-12-27 07:31:22 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"65"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "65"]] Completed 500 Internal Server Error in 3ms  (0.2ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/66/coord/new" for 127.0.0.1 at 2014-12-27 07:31:22 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"66"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "66"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 66]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (90.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 98ms (Views: 93.6ms | ActiveRecord: 1.1ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/66/coord" for 127.0.0.1 at 2014-12-27 07:31:22 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"66"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "66"]] Completed 500 Internal Server Error in 4ms  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (1.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 35], ["updated_at", Sat, 27 Dec 2014 06:31:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/67/coord/new" for 127.0.0.1 at 2014-12-27 07:31:22 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"67"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "67"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 67]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 20.4ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 36], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 36], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 36], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 68]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 68]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 68], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/68/payments/new" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"68"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 36]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.7ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/68/payments" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"68"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]] Completed 500 Internal Server Error in 5ms  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 37], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 37], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 37], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 71]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 71]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 71], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/71/payments/new" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"71"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 37]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.9ms | ActiveRecord: 1.8ms) Started POST "/adherent/members/71/payments" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"71"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]] Completed 500 Internal Server Error in 5ms  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 38], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 38], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 38], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 74]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 74]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 74], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/74/payments/new" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"74"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "74"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 38]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.0ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/74/payments" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"74"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "74"]] Completed 500 Internal Server Error in 6ms  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 39], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (1.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 39], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 39], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 77]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 77]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 77], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/77/payments/new" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"77"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "77"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 39]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.3ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/77/payments" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"77"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "77"]] Completed 500 Internal Server Error in 7ms  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 40], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 40], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 40], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 80]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 80]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 80], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/80/payments/new" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"80"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "80"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 40]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (17.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 20.2ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/80/payments" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"80"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "80"]] Completed 500 Internal Server Error in 5ms  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 41], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 41], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 41], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 83]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 83]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 83], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/83/payments/new" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"83"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "83"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 41]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.4ms | ActiveRecord: 1.9ms) Started POST "/adherent/members/83/payments" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"83"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "83"]] Completed 500 Internal Server Error in 5ms  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 42], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 42], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 42], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 86]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 86]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 86], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/86/payments/new" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"86"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "86"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 42]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.4ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/86/payments" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"86"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "86"]] Completed 500 Internal Server Error in 4ms  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 43], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 43], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 43], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 89]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 89]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 89], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/89/payments/new" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"89"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "89"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 43]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 86ms (Views: 13.4ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/89/payments" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"89"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "89"]] Completed 500 Internal Server Error in 4ms  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 44], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 44], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 44], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 92]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 92]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 92], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/92/payments/new" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"92"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "92"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 44]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.4ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/92/payments" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"92"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "92"]] Completed 500 Internal Server Error in 6ms  (0.7ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (2.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 45], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 45) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 45) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 45], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 45) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 45) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 45], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 95]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 95]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 95], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/95/payments/new" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"95"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "95"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 45]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.1ms | ActiveRecord: 2.0ms) Started POST "/adherent/members/95/payments" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"95"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "95"]] Completed 500 Internal Server Error in 7ms  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 46], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 46], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 46], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 98]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 98]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 98], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/98/payments/new" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"98"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "98"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 46]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.3ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/98/payments" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"98"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "98"]] Completed 500 Internal Server Error in 5ms  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 47], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 47], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 47], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 101]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 101]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 101], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/101/payments/new" for 127.0.0.1 at 2014-12-27 07:31:23 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"101"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "101"]] Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 47]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (77.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 89ms (Views: 81.1ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/101/payments" for 127.0.0.1 at 2014-12-27 07:31:24 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"101"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "101"]] Completed 500 Internal Server Error in 4ms  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.4ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (2.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 48], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 48], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 48], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 104]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 104]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 104], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/104/payments/new" for 127.0.0.1 at 2014-12-27 07:31:24 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"104"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "104"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 48]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.0ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/104/payments" for 127.0.0.1 at 2014-12-27 07:31:24 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"104"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "104"]] Completed 500 Internal Server Error in 5ms  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 49], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 49], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 49], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (2.1ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 107]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 107]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 107], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/107/payments/new" for 127.0.0.1 at 2014-12-27 07:31:24 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"107"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "107"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 49]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.4ms | ActiveRecord: 1.9ms) Started POST "/adherent/members/107/payments" for 127.0.0.1 at 2014-12-27 07:31:24 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"107"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "107"]] Completed 500 Internal Server Error in 5ms  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 50], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 50], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 50], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 110]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 110]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 110], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/110/payments/new" for 127.0.0.1 at 2014-12-27 07:31:24 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"110"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "110"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 50]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.4ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/110/payments" for 127.0.0.1 at 2014-12-27 07:31:24 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"110"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "110"]] Completed 500 Internal Server Error in 4ms  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 51], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 51], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 51], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 113]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 113]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 113], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 113]] Started GET "/adherent/members/113/payments/new" for 127.0.0.1 at 2014-12-27 07:31:24 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"113"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "113"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 51]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.4ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/113/payments" for 127.0.0.1 at 2014-12-27 07:31:24 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"113"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "113"]] Completed 500 Internal Server Error in 4ms  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.5ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 52], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 116]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 116]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 116], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 116]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 52]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 116], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/116/payments/10" for 127.0.0.1 at 2014-12-27 07:31:24 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"116", "id"=>"10"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "116"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 10 LIMIT 1 [["member_id", 116]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 116]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 55]] Completed 500 Internal Server Error in 16ms SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 53], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 117]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 117]]  (0.7ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 117], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 53]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 117], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/117/payments/11" for 127.0.0.1 at 2014-12-27 07:31:24 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"117", "id"=>"11"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 11 LIMIT 1 [["member_id", 117]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 55]] Completed 500 Internal Server Error in 19ms SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 54], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 118]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 118]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 118], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 118]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 54]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 118], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["payment_id", 12], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/118/payments/12" for 127.0.0.1 at 2014-12-27 07:31:24 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"118", "id"=>"12"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "118"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 12 LIMIT 1 [["member_id", 118]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Member Load (7.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 118]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 55]] Completed 500 Internal Server Error in 26ms SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 55], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 119]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 119]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 119], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/119/payments/new" for 127.0.0.1 at 2014-12-27 07:31:24 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"119"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "119"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 55]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.9ms | ActiveRecord: 2.3ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 56], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 120]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 120]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 120], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/120/payments/new" for 127.0.0.1 at 2014-12-27 07:31:24 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"120"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 56]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.5ms | ActiveRecord: 2.1ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 57], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 121]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 121]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 121], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 121]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 57]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 121], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (0.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["payment_id", 13], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/121/payments" for 127.0.0.1 at 2014-12-27 07:31:24 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"121"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "121"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 121]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Completed 500 Internal Server Error in 114ms SQL (1.0ms) DELETE FROM "adherent_members"  (0.6ms) ROLLBACK  (0.9ms) BEGIN  (0.3ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 58], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 122]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 122]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 122], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 122]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 58]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 122], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["payment_id", 14], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/122/payments" for 127.0.0.1 at 2014-12-27 07:31:24 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"122"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "122"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 122]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (4.5ms) Completed 500 Internal Server Error in 12ms SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.5ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 59], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 123]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 123]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 123], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/123/payments/new" for 127.0.0.1 at 2014-12-27 07:31:24 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"123"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 59]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 13.6ms | ActiveRecord: 1.9ms)  (1.0ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 123]] Started POST "/adherent/members/123/payments" for 127.0.0.1 at 2014-12-27 07:31:25 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"123"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Completed 500 Internal Server Error in 4ms SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 60], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 124]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 124]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 124], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/124/payments/new" for 127.0.0.1 at 2014-12-27 07:31:25 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"124"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "124"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 60]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.1ms | ActiveRecord: 1.6ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x648e21a @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x648e256%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 7ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x64c8e7e @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 136ms (Views: 129.9ms | ActiveRecord: 2.2ms)  (1.1ms) ROLLBACK  (1.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x64f91e6 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (2.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 1.7ms | ActiveRecord: 4.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" INNER JOIN "adherent_members" ON "adherent_payments"."member_id" = "adherent_members"."id" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 64]] Completed 200 OK in 65ms (Views: 20.8ms | ActiveRecord: 3.6ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.4ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x659d840 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x65b5a76 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 7ms (ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"125"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/125 Completed 302 Found in 6ms (ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"126"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 2.4ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"127"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 127 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 127 [["name", "Dalton"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/127 Completed 302 Found in 14ms (ActiveRecord: 4.1ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"128"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/128 Completed 302 Found in 7ms (ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 72) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 72], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/129/coord/new Completed 302 Found in 13ms (ActiveRecord: 5.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 73) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 73], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/130/coord/new Completed 302 Found in 12ms (ActiveRecord: 2.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 75) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 75], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/131/coord/new Completed 302 Found in 11ms (ActiveRecord: 2.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 25ms (Views: 19.1ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (1.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.0ms | ActiveRecord: 3.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.6ms | ActiveRecord: 2.2ms)  (0.5ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:31:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 81]] Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.5ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["member_id", 132], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["zip", 59000]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 132]]  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 3]] SQL (0.4ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 132]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 82) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 82) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 82], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (4.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 133], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (4.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 133]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 133]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 133], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_payments"  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 82]]  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) ROLLBACK  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 83) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 83) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 83], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 134], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 134]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 134]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 134], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 134]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 83]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 134], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL)  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 48], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 15], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (2.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 84) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 84) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 84], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 135], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 135]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 135]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 135], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (2.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 135]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 84]]  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 85) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 85) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 85], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 136], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 136]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 136]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 136], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 136]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 85]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 136], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 48], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 16], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (2.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 49]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 49], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 16], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 86) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 86) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 86], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 137], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 137]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 137]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 137], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 137]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 86]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 137], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] SQL (0.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 48], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 17], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 49]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 49], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 17], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.5ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 87) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 87], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 87) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 87], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 138], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 139], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 139]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 87]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 139], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 48], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 18], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 49]] SQL (0.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 49], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 18], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 87]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 138], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] SQL (0.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 48], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 49]] SQL (0.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 49], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 88], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 88], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 140], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (2.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 141], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 88]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 141], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 48], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 20], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 49]] SQL (1.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 49], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 20], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 89) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 89) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 89], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 89) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 89) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 89], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 142], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 143], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 143]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 89]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 143], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] SQL (0.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 48], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 21], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 49]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 49], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 21], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 143]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 89]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 143], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 48], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 22], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 49]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 49], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 22], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 89]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 142], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 48], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 23], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 49]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 49], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 23], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 62], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]]  (0.7ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 63]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 63], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 63]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 64]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 64], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 06:33:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.5ms) BEGIN  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.6ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.5ms) ROLLBACK  (0.5ms) BEGIN  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.5ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:33:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 144]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 144]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:11 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 144], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:33:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 144]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 144]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:33:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 145]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 145]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:11 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 145], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:33:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 145]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 145]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:33:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 146]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 146]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:33:11 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 146], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:33:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 146]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 146]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:33:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (2.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:33:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:33:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 27 Dec 2014 06:33:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:33:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 153]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 153]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 153], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 153]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 153]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 154]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 154]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 154], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 154]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 154]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 155]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 155]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 155], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 155]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 155]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 90) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 90) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 90], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 90) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 90) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 90], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 156], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 157], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 90]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 157], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL)  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 71], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["payment_id", 24], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 91) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 91) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 91], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 91) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 91) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 91], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 158], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 159], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 91]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 159], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 71], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["payment_id", 25], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 91]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 159], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 71], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["payment_id", 26], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 158]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 91]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 158], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 71], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["payment_id", 27], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 72]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 72], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00], ["payment_id", 27], ["updated_at", Sat, 27 Dec 2014 06:34:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 92) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 92) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 92], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 92) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 92) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 92], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 160], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 161], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 161]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 92]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 161], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 71], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["payment_id", 28], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 160]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 92]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 160], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 71], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["payment_id", 29], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 72]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 72], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["payment_id", 29], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 77]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 77], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 77]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 78]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 78], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 79]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 79], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 79]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 79]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.5ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 93], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 162], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 162]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 162]]  (3.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 162], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_payments"  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 162]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 93]]  (0.5ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 94) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 94) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 94], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 163], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 163]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 163]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 163], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 163]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 94]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 163], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 71], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["payment_id", 30], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 95], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 164], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 164]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 164]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 164], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 164]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 95]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 164], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 71], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["payment_id", 31], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 96], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 165], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 165]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 165]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 165], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 165]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 96]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 97], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 166], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 166]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 166]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 166], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 166]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 97]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 166], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 71], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["payment_id", 32], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["member_id", 167], ["updated_at", Sat, 27 Dec 2014 06:34:25 UTC +00:00], ["zip", 59000]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 167]]  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 4]] SQL (0.8ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 167]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.4ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 27 Dec 2014 06:39:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:13 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 171]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 171]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:13 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 171], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:39:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 171]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 171]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 172]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 172]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:13 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 172], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:39:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 172]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 172]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 173]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 173]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:13 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 173], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:39:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 173]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 173]]  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 98], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 98], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 174], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 175], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 98]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 175], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 175]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 94]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 94], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["payment_id", 33], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (2.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 99], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 99], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (2.1ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 176], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 177], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 177]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 99]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 177], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 177]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 96]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 96], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["payment_id", 34], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 177]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 99]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 177], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 177]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 96]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 96], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["payment_id", 35], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 176]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 99]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 176], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 176]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 95]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 95], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["payment_id", 36], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 100], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 100], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 178], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 179], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 179]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 100]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 179], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 179]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 98]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 98], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["payment_id", 37], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 100]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 178], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 178]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 97]] SQL (1.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 97], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["payment_id", 38], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 99]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 99], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 99]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 100]]  (0.8ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 100], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 101]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 101], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 101]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 101]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 101], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 180], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 180]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 180]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 180], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 180]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 101]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 180], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 180]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 102]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 102], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["payment_id", 39], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 103]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 103], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["payment_id", 39], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]]  (0.6ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 102], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 181], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 181]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 181]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 181], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 102]]  (0.4ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.4ms) ROLLBACK  (0.5ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 103], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 182], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 182]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 182]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 182], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 182]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 103]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 182], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 182]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 106]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 106], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["payment_id", 40], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 107]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 107], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["payment_id", 40], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 104) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 104) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 104], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 183], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 183]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 183]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 183], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 183]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 104]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 105) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 105) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 105], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 184], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 184]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 184]]  (0.6ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 184], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 184]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 105]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 184], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 184]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 110]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 110], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["payment_id", 41], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["member_id", 185], ["updated_at", Sat, 27 Dec 2014 06:39:14 UTC +00:00], ["zip", 59000]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 185]]  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 5]] SQL (0.7ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 185]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (4.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 106) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 106) LIMIT 1 SQL (1.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 106], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 186], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 186]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 186]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 186], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 186]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 106]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 107) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 107) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 107], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 187], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 187]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 187]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 187], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 187]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 107]]  (0.5ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 108) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 108) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 108], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 188], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 188]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 188]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 188], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 188]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 108]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 188], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 188]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 116]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 116], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["payment_id", 42], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 117]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 117], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["payment_id", 42], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 109) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 109) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 109], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 189], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 189]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 189]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 189], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 189]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 109]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 189], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 189]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 118]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 118], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["payment_id", 43], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 119]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 119], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["payment_id", 43], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 110) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 110) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 110], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 190], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 190]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 190]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 190], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (1.2ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 190]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 110]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 190], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 190]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 120]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 120], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["payment_id", 44], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 111) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 111) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 111], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 111) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 111) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 111], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.9ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 191], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 192], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 192]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 111]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 192], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 192]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 123]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 123], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["payment_id", 45], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 112) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 112) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 112], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 112) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 112) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 112], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 193], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 194], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 194]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 112]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 194], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 194]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 125]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 125], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["payment_id", 46], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 194]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 112]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 194], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 194]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 125]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 125], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["payment_id", 47], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 193]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 112]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 193], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 193]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 124]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 124], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["payment_id", 48], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.5ms) DELETE FROM "adherent_members"  (0.7ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 113) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 113) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 113], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 113) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 113) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 113], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 195], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 196], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]]  (1.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 196]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 113]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 196], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:39:48 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 196]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 127]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 127], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["payment_id", 49], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 195]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 113]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 195], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 195]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 126]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 126], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["payment_id", 50], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.6ms) ROLLBACK  (0.5ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 128]]  (0.3ms) SAVEPOINT active_record_1 SQL (2.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 128], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 128]]  (0.7ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 129]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 129], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 130]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 130], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 130]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 130]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.4ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 200]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 200]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 200], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 200]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 200]]  (0.9ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 201]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 201]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 201], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 201]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 201]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 202]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 202]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 202], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 202]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 202]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["member_id", 203], ["updated_at", Sat, 27 Dec 2014 06:39:49 UTC +00:00], ["zip", 59000]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 203]]  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 6]] SQL (0.7ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 203]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (4.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Payment Load (1.3ms) SELECT "adherent_payments".* FROM "adherent_payments" INNER JOIN "adherent_members" ON "adherent_payments"."member_id" = "adherent_members"."id" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 114]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/allpayments/index.html.haml within layouts/adherent/application (0.3ms) Completed 200 OK in 141ms (Views: 10.2ms | ActiveRecord: 69.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.6ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.0ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.9ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5d1a59c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5d36256 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:39:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 10ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:39:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:39:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"204"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 204 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 204 [["name", "Dalton"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/204 Completed 302 Found in 67ms (ActiveRecord: 5.3ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"205"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/205 Completed 302 Found in 6ms (ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"206"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"207"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/207 Completed 302 Found in 7ms (ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.8ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 2.1ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 127]] Completed 200 OK in 8ms (Views: 1.0ms | ActiveRecord: 2.6ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 1.8ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 129) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 129], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/208/coord/new Completed 302 Found in 29ms (ActiveRecord: 4.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 130) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 130], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/209/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 131) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 131], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/210/coord/new Completed 302 Found in 12ms (ActiveRecord: 4.0ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x5d6b924 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5d6b99c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 7ms (ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5d992d4 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 3.3ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5e668f6 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.6ms | ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e9251e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 3.5ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x5edebbc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x5f1dbfa @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5f1dbfa%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 7ms (ActiveRecord: 2.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5f57972 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.8ms | ActiveRecord: 2.0ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5f8816c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5fc13f4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.9ms | ActiveRecord: 1.2ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ff9c68 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6019edc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6019edc%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 7ms (ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x602db76 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6043228 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.8ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6066322 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6066322%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 7ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x61158a4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 3.9ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x61353d4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Unpermitted parameters: mode, date Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x61353d4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 2.3ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x6155936 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Unpermitted parameters: mode, date Completed 200 OK in 11ms (Views: 1.0ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x54f23b0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Unpermitted parameters: mode, date Completed 500 Internal Server Error in 7ms  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x55b5d10 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x55b5d10%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x589f954 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5911ab8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.1ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x59641b4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.7ms | ActiveRecord: 2.2ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5aee606 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5c6e62a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5c6e62a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5c990dc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5cc0a9c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.5ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ce44c4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5ce44c4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5d0f872 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 4.2ms | ActiveRecord: 1.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5d3725a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x5d3bd32 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 1.9ms)  (0.7ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d5e8a0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5d5e8a0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 1.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d8efa0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5dcd4e4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5dcd4e4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 8ms (ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e77278 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 3.4ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ea707c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' ORDER BY "organisms"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:40:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.3ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x63b1284 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (4.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x63ab618%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 36ms (ActiveRecord: 13.4ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x64453c6 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 63ms (Views: 54.5ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x55f4628 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"211"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/211 Completed 302 Found in 8ms (ActiveRecord: 3.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"212"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 212 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 212 [["name", "Dalton"], ["updated_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/212 Completed 302 Found in 13ms (ActiveRecord: 4.4ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"213"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/213 Completed 302 Found in 6ms (ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"214"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.9ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.1ms | ActiveRecord: 2.6ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 176]] Completed 200 OK in 18ms (Views: 1.1ms | ActiveRecord: 2.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.7ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 178) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 178], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/215/coord/new Completed 302 Found in 12ms (ActiveRecord: 4.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.6ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 180) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 180], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/216/coord/new Completed 302 Found in 25ms (ActiveRecord: 4.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 181) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 181], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/217/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.5ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x6533ec2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x6544614 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x655a900 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x655a900%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x6574e54 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6574e54%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x658ee1c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 3.3ms | ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x65ab4ea @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.3ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x65c4bca @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Unpermitted parameters: mode, date Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x65c4bca%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x65de228 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Unpermitted parameters: mode, date Completed 500 Internal Server Error in 6ms  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x58ad8a6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Unpermitted parameters: mode, date Completed 200 OK in 14ms (Views: 2.3ms | ActiveRecord: 3.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5d3d83a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5fd25be @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x60297ec @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x60297ec%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x637ab3a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x638670a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6393bda @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x639f3b8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x639f3b8%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 7ms (ActiveRecord: 2.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x63b2b66 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x63b2b66%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x63cbe90 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.4ms | ActiveRecord: 2.9ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x63ec47e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x6410dec @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x6431114 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6431114%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6451e14 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.2ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6468bdc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6483b1c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x649601e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.5ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64aecea @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.4ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64c70ba @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.7ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64e4cd2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.4ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64fd106 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6516a16 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x651bc1e @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.5ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x6537888 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6537888%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x6557b42 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6557b42%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 2.1ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x656c25e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:41:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Payment Load (1.3ms) SELECT "adherent_payments".* FROM "adherent_payments" INNER JOIN "adherent_members" ON "adherent_payments"."member_id" = "adherent_members"."id" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 217]] Completed 200 OK in 17ms (Views: 2.9ms | ActiveRecord: 2.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (4.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/edit.html.erb within layouts/adherent/application (0.4ms) Completed 200 OK in 40ms (Views: 8.5ms | ActiveRecord: 12.7ms)  (0.7ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x55186b4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x552a90e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 7ms (ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"218"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 218 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 218 [["name", "Dalton"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/218 Completed 302 Found in 13ms (ActiveRecord: 4.7ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"219"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"220"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/220 Completed 302 Found in 6ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"221"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/221 Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 20ms (Views: 1.7ms | ActiveRecord: 2.0ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.9ms | ActiveRecord: 2.1ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.0ms | ActiveRecord: 2.8ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 2.2ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 232) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 232], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/222/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.7ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 233) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 233], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/223/coord/new Completed 302 Found in 75ms (ActiveRecord: 4.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 234) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 234], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/224/coord/new Completed 302 Found in 11ms (ActiveRecord: 4.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" INNER JOIN "adherent_members" ON "adherent_payments"."member_id" = "adherent_members"."id" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 235]] Completed 200 OK in 21ms (Views: 2.2ms | ActiveRecord: 3.1ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x54febb0 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x54fea16%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 7ms (ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5519cf8 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 2.9ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x553ff66 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5fd5836 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.3ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ff8188 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x601dac8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x601dac8%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x603ad30 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 1.9ms)  (0.7ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6051396 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.8ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x606675a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.6ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6083152 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x609bba8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x609bba8%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 2.2ms)  (0.5ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x60b605c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x60d33c8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6110dfe @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6110dfe%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x613b40a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 3.6ms | ActiveRecord: 2.2ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x616e7c4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Unpermitted parameters: mode, date Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x616e7c4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x61bf1f6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Unpermitted parameters: mode, date Completed 200 OK in 11ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x625654c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Unpermitted parameters: mode, date Completed 500 Internal Server Error in 6ms  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62924a2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62bff7e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62de9ba @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x62de9ba%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62ea242 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6306870 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x4fa1078 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x4fa1078%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x535dba8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5462bb6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5496696 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5496696%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x54bd020 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 3.8ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x54ea8d6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x54ea8d6%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5509b14 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5520e0e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5520e0e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x553ab74 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x553ccee @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.7ms | ActiveRecord: 2.1ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5fd5430 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.7ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ff3ba6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x5cdd37c @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (1.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (4.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5cd7706%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 32ms (ActiveRecord: 12.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5d734b2 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 63ms (Views: 53.9ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x4f215d0 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"225"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 225 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 225 [["name", "Dalton"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/225 Completed 302 Found in 14ms (ActiveRecord: 4.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"226"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.2ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"227"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/227 Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"228"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/228 Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5cc80c6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5cd6c52 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.8ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.3ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 18ms (Views: 1.7ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.6ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.8ms | ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 287) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 287], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/229/coord/new Completed 302 Found in 13ms (ActiveRecord: 4.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 288) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 288], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/230/coord/new Completed 302 Found in 25ms (ActiveRecord: 4.6ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 289) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 289], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/231/coord/new Completed 302 Found in 12ms (ActiveRecord: 4.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 2.4ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x5eadee0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 3.0ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ecd51a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5ecd51a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5eebcb8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x51d2b58 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x54daf44 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x55e29be @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 1.9ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x56697ac @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x58ff976 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x58ff976%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 7ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x59588d2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.3ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5cabc3c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5cb6c72 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5cb6c72%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 2.5ms)  (0.6ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5cc2b76 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Unpermitted parameters: mode, date Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5cc2b76%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 1.8ms)  (1.0ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5cd6e32 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Unpermitted parameters: mode, date Completed 200 OK in 14ms (Views: 3.9ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d1d09e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Unpermitted parameters: mode, date Completed 500 Internal Server Error in 6ms  (0.4ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5d3d2ea @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5d55214 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.8ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5d777ec @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.5ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5d93ef6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5d93ef6%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5daa6b0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.6ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5dc34b2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5dd84ac @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5dd84ac%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5df4b98 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (1.0ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e0c202 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e291e0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5e291e0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (1.1ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e42a28 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.6ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e69d08 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5e69d08%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e8733a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ea0362 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5ea0362%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ebc09e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x5ec10c6 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.6ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ed8410 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.0ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ef031c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:42:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5c03668 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (4.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/edit.html.erb within layouts/adherent/application (0.3ms) Completed 200 OK in 35ms (Views: 7.4ms | ActiveRecord: 9.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ca2452 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.3ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5cbef08 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x4f04368 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x4f04368%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x53db1d4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x54ff9f2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x558280c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x581e462 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x581e462%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x587df16 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x587df16%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5bd29be @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 2.0ms)  (1.0ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5bde2c8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 32ms (Views: 2.5ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 3.7ms | ActiveRecord: 2.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 16ms (Views: 1.8ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5cdb87e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5ceff7c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 341) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 341], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/232/coord/new Completed 302 Found in 30ms (ActiveRecord: 4.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 342) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 342], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/233/coord/new Completed 302 Found in 12ms (ActiveRecord: 5.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 343) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 343], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/234/coord/new Completed 302 Found in 12ms (ActiveRecord: 5.2ms)  (0.6ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"235"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/235 Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"236"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"237"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/237 Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"238"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 238 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 238 [["name", "Dalton"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/238 Completed 302 Found in 13ms (ActiveRecord: 4.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x55aa4a6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x58056e2 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.7ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x586fdbc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x586fdbc%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5bd3576 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5be3d0e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5be3d0e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5bf126a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5c01746 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 1.8ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5c13892 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5c34d6c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.6ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5c6449a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5c80712 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 1.9ms)  (0.6ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"27/12/2015", "from_date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ca335c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:49 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5ca335c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"27/12/2015", "from_date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5cbe332 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"27/12/2015", "from_date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d046c0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5d046c0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d24b1e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d4080a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d5db9e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5d5db9e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 8ms (ActiveRecord: 2.6ms)  (0.5ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d79524 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5d79524%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5d945e0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.4ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5dafb88 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5dc113a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5dc113a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5dd9208 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.4ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5dfc76c @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x5e151ae @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:50:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5e151f4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x627f532 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (4.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 29ms (ActiveRecord: 9.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x6307928 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 7.8ms | ActiveRecord: 2.1ms)  (0.7ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 28ms (Views: 2.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"239"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"240"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/240 Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"241"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/241 Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"242"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 242 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 242 [["name", "Dalton"], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/242 Completed 302 Found in 13ms (ActiveRecord: 4.1ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 385) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 385], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/243/coord/new Completed 302 Found in 11ms (ActiveRecord: 4.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 386) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 386], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/244/coord/new Completed 302 Found in 24ms (ActiveRecord: 4.2ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.9ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 387) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 387], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/245/coord/new Completed 302 Found in 12ms (ActiveRecord: 4.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.8ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x63a9b56 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.1ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x63c4a5a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x63df486 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x63f9886 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6415fe0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6415fe0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x642abd4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x642abd4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 7ms (ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6445a56 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.8ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6458584 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x647180e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x647180e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x6488824 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64a59f6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64b81f0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.6ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5754af4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5a8a25a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5bb5fb2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e8143a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5e8143a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.6ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ece5f0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5ece5f0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x624ac06 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62586b2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6265d4e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6265d4e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"27/12/2015", "from_date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x6270ed8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6270ed8%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"27/12/2015", "from_date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x62837f4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 1.6ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"27/12/2015", "from_date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x62c9434 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x62c9434%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62eddb6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x6312882 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.7ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x633f1f2 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.2ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x635683e @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (1.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6356866%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 9ms (ActiveRecord: 3.7ms)  (0.6ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x636e290 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x636e290%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 7ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x63917a4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.4ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x63b164e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x63b164e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x63cc7fa @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x63d18c2 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.5ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x63eb6c8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.7ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64022b0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x641f752 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (2.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:51:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 2.4ms | ActiveRecord: 3.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x61eb562 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (4.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 30ms (ActiveRecord: 9.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x6273980 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 70ms (Views: 7.9ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 15ms (Views: 1.7ms | ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"246"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/246 Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"247"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/247 Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"248"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"249"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 249 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 249 [["name", "Dalton"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/249 Completed 302 Found in 13ms (ActiveRecord: 4.5ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 437) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 437], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/250/coord/new Completed 302 Found in 23ms (ActiveRecord: 4.8ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 438) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 438], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/251/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.9ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 439) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 439], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/252/coord/new Completed 302 Found in 11ms (ActiveRecord: 4.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x632d538 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 2.5ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x6361360 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x637d9ca @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x637d9f2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x6397ac8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.4ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x63b07b2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x63b07b2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x63cd952 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 2.2ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x63e525a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x63e525a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"27/12/2015", "from_date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x6403e12 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 1.7ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"27/12/2015", "from_date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x59f9278 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x59f9278%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"27/12/2015", "from_date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5b0c3fe @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5b0c3fe%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5dec286 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e312a0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e81a5c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5e81a5c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x61c3fe4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x61cf89e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x61dbc48 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.2ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x61e95aa @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.5ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x62019ac @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x62019ac%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x621c734 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x623d934 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x623d934%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x625df68 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x625df68%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 2.2ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x627b41e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.2ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x629748e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62ae38c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62c6aa4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62da194 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62f5020 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.9ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 2.6ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x630d6a2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x630c428 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.2ms | ActiveRecord: 1.4ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x632c4b2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.6ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x634b86c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x636558c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.6ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x6385ae4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6385ae4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x639e864 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x639e864%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x63bd8cc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 2.4ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (2.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.7ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 256]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 256]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 256], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 256]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 256]]  (0.4ms) ROLLBACK  (0.7ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 257]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 257]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 257], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 257]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 257]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 258]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 258]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 258], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 258]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 258]]  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.9ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 478) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 478) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 478], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 259], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 259]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 259]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 259], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 259]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 478]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 259], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]] Adherent::Adhesion Load (2.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 259]]  (1.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 137]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 137], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["payment_id", 51], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 138]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 138], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["payment_id", 51], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 479) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 479) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 479], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 260], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 260]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 260]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 260], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 260]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 479]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 260], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 260]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 139]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 139], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["payment_id", 52], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 140]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 140], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["payment_id", 52], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]]  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.5ms) COMMIT  (0.4ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 480) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 480) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 480], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 261], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 261]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 261]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 261], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 261]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 480]]  (0.5ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 481) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 481) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 481], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 262], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 262]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 262]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 262], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 262]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 481]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 482) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 482) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 482], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 263], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 263]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 263]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 263], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 263]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 482]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 263], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 263]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 145]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 145], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["payment_id", 53], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["member_id", 264], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["zip", 59000]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 264]]  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 7]] SQL (0.7ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 264]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN  (0.4ms) ROLLBACK SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) BEGIN SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (33.9ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 483) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 483) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 483], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 483) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 483) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 483], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 483) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 483) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 483], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 483) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 483) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 483], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 483) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 483) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 483], ["updated_at", Sat, 27 Dec 2014 06:52:31 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:52:35 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 483]]  (2.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 265]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 265]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 266]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 266]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 267]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 267]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 268]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 268]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 269]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 269]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (2.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.1ms) Completed 200 OK in 231ms (Views: 206.9ms | ActiveRecord: 18.3ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2014-12-27 07:52:36 +0100 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2014-12-27 07:52:36 +0100 Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2014-12-27 07:52:36 +0100 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2014-12-27 07:52:36 +0100 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2014-12-27 07:52:36 +0100 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2014-12-27 07:52:36 +0100 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2014-12-27 07:52:36 +0100 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2014-12-27 07:52:36 +0100 Started GET "/assets/images/sort_asc.png" for 127.0.0.1 at 2014-12-27 07:52:36 +0100 Started GET "/assets/images/sort_both.png" for 127.0.0.1 at 2014-12-27 07:52:36 +0100 Started GET "/assets/images/forward_disabled.png" for 127.0.0.1 at 2014-12-27 07:52:36 +0100 Started GET "/assets/images/back_disabled.png" for 127.0.0.1 at 2014-12-27 07:52:36 +0100 Started DELETE "/adherent/members/265" for 127.0.0.1 at 2014-12-27 07:52:36 +0100 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"265"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "265"]]  (0.1ms) BEGIN Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 265]] SQL (0.5ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 265]]  (198.5ms) COMMIT Redirected to http://127.0.0.1:34626/adherent/members Completed 302 Found in 216ms (ActiveRecord: 207.4ms) Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:52:37 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 483]]  (1.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 266]] Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 266]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 267]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 267]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 268]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 268]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 269]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 269]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 43ms (Views: 32.7ms | ActiveRecord: 7.5ms)  (2.2ms) SELECT COUNT(*) FROM "adherent_members"  (2.5ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (6.1ms) select table_name from information_schema.views where table_schema = 'adh_test'  (112.6ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (2.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:38 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:38 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:38 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:38 UTC +00:00]]  (2.1ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:38 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:38 UTC +00:00]]  (1.0ms) COMMIT Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) BEGIN Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:38 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Sat, 27 Dec 2014 06:52:38 UTC +00:00]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (1.4ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2014-12-27 07:52:38 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 1]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (22.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 88ms (Views: 64.6ms | ActiveRecord: 16.6ms) Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2014-12-27 07:52:38 +0100 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2014-12-27 07:52:38 +0100 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2014-12-27 07:52:38 +0100 Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2014-12-27 07:52:38 +0100 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.1ms) BEGIN Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] SQL (0.5ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (118.0ms) COMMIT Redirected to http://127.0.0.1:34626/adherent/members/1/payments Completed 302 Found in 135ms (ActiveRecord: 122.6ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2014-12-27 07:52:38 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 76ms (Views: 69.3ms | ActiveRecord: 3.7ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2014-12-27 07:52:39 +0100  (2.5ms) SELECT COUNT(*) FROM "adherent_payments"  (1.4ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (4.2ms) select table_name from information_schema.views where table_schema = 'adh_test'  (123.7ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_reglements", "organisms", "adherent_members", "adherent_payments" RESTART IDENTITY CASCADE;  (1.5ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (1.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:39 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:39 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:39 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:39 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:39 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:39 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.3ms) BEGIN SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:39 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:39 UTC +00:00]]  (1.4ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2014-12-27 07:52:39 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (1.2ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.4ms | ActiveRecord: 6.0ms) Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2014-12-27 07:52:40 +0100 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (4.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (123.9ms) COMMIT Redirected to http://127.0.0.1:34626/adherent/members/1/adhesions Completed 302 Found in 156ms (ActiveRecord: 132.1ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2014-12-27 07:52:40 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.9ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:34626/adherent/members/1/adhesions/new Completed 302 Found in 7ms (ActiveRecord: 2.7ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2014-12-27 07:52:40 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (2.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (1.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (35.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 52ms (Views: 41.3ms | ActiveRecord: 5.7ms) Started GET "/assets/adherent/cal.gif" for 127.0.0.1 at 2014-12-27 07:52:40 +0100  (1.9ms) SELECT COUNT(*) FROM "adherent_adhesions"  (2.2ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (125.5ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:52:41 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (2.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40ms (Views: 28.3ms | ActiveRecord: 10.7ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 2], ["updated_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 2], ["updated_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 2], ["updated_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 2], ["updated_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:52:41 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 2]]  (1.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 6]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 6]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 7]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 8]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 9]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 9]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 10]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 26.0ms | ActiveRecord: 7.5ms)  (2.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 3], ["updated_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 3], ["updated_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 3], ["updated_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 3], ["updated_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:52:41 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 3]]  (1.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 11]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 12]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 12]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 13]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 13]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 14]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 15]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 43ms (Views: 31.2ms | ActiveRecord: 10.6ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 11]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 11], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:41 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/11/adhesions" for 127.0.0.1 at 2014-12-27 07:52:41 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"11"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 11]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]]  (1.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 10.2ms | ActiveRecord: 4.1ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 4], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 4], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 4], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 4], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:52:42 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 4]]  (2.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 16]] Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 16]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 17]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 18]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 18]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 19]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 19]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 20]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 43ms (Views: 30.2ms | ActiveRecord: 11.0ms) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/16/edit" for 127.0.0.1 at 2014-12-27 07:52:42 +0100 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"16"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (12.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 19.7ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 5], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 5], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 5], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 5], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 5], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:52:42 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 5]]  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 21]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 21]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 22]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 22]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 23]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 23]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 24]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 24]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 25]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40ms (Views: 29.2ms | ActiveRecord: 8.8ms) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/21/payments" for 127.0.0.1 at 2014-12-27 07:52:42 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"21"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "21"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 21]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 10ms (Views: 4.7ms | ActiveRecord: 2.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 6], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 6], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 6], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 6], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 6], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:52:42 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 6]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 26]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 27]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 27]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 28]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 28]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 29]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 29]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 30]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 30]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 101ms (Views: 92.2ms | ActiveRecord: 7.0ms) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/26/coord" for 127.0.0.1 at 2014-12-27 07:52:42 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"26"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 26]] Redirected to http://www.example.com/adherent/members/26/coord/new Completed 302 Found in 7ms (ActiveRecord: 2.0ms) Started GET "/adherent/members/26/coord/new" for 127.0.0.1 at 2014-12-27 07:52:42 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"26"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 26]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 25.3ms | ActiveRecord: 1.5ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 7], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 7], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 7], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 7], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 7], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:52:42 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 7]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 31]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 31]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 32]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 32]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 33]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 33]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 34]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 34]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 35]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 45ms (Views: 37.3ms | ActiveRecord: 6.5ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/31/adhesions" for 127.0.0.1 at 2014-12-27 07:52:42 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"31"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 31]] Redirected to http://www.example.com/adherent/members/31/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.8ms) Started GET "/adherent/members/31/adhesions/new" for 127.0.0.1 at 2014-12-27 07:52:42 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"31"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 31]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.0ms | ActiveRecord: 2.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 8], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 8], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 8], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 8], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 8], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:52:42 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 8]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 36]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 36]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 37]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 37]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 38]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 38]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 39]] Adherent::Coord Load (1.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 39]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 40]] Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 40]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 37ms (Views: 27.8ms | ActiveRecord: 7.6ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2014-12-27 07:52:42 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 15.9ms | ActiveRecord: 0.5ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 9], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 9], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 9], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 9], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 9], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 07:52:42 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 9]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 41]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 41]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 42]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 42]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 43]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 43]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 44]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 45]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 45]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 103ms (Views: 95.3ms | ActiveRecord: 6.6ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["member_id", 41], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 41]] Started GET "/adherent/members/41/coord" for 127.0.0.1 at 2014-12-27 07:52:42 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"41"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 41]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 8.0ms | ActiveRecord: 1.7ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 10], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 10], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 10], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 10], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 10], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2014-12-27 07:52:42 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 12.1ms | ActiveRecord: 0.6ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2014-12-27 07:52:42 +0100 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 10], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/51/coord/new Completed 302 Found in 12ms (ActiveRecord: 3.4ms) Started GET "/adherent/members/51/coord/new" for 127.0.0.1 at 2014-12-27 07:52:42 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"51"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "51"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 51]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 19.0ms | ActiveRecord: 1.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x608be4c @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.7ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x60b45e0 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x60d5efc @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x60d5f38%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/52/adhesions/new" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"52"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "52"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 52]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 52]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.0ms | ActiveRecord: 2.5ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/53/adhesions/new" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"53"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "53"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 53]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 53]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.8ms | ActiveRecord: 2.5ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 53]] Started POST "/adherent/members/53/adhesions" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"53"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "53"]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 53], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/53/adhesions Completed 302 Found in 9ms (ActiveRecord: 2.7ms) Started GET "/adherent/members/53/adhesions" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"53"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "53"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 53]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 53]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 79ms (Views: 73.7ms | ActiveRecord: 2.4ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 53]] SQL (0.8ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 16], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 54], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/54/adhesions" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"54"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "54"]] Adherent::Adhesion Exists (0.9ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 54]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 54]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.4ms | ActiveRecord: 4.9ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 17], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 55], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/55/adhesions" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"55"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "55"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 55]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 55]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 9.6ms | ActiveRecord: 4.1ms) Started GET "/adherent/members/55/adhesions/4/edit" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"55", "id"=>"4"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "55"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 55], ["id", "4"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 14.1ms | ActiveRecord: 1.9ms) SQL (0.3ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 56], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/56/adhesions" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"56"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "56"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 56]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 56]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 9.2ms | ActiveRecord: 3.2ms) Started GET "/adherent/members/56/payments/new" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"56"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "56"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 56]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 22.6ms | ActiveRecord: 3.2ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.6ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 57]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 57]]  (0.5ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 57], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.2ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 57]] Started GET "/adherent/members/57/payments/new" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"57"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "57"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 57]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 15.3ms | ActiveRecord: 3.7ms) Started POST "/adherent/members/57/payments" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"57"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "57"]] Completed 500 Internal Server Error in 4ms  (0.5ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 60]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 60]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 60], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/60/payments/new" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"60"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "60"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 60]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 12.9ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/60/payments" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"60"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "60"]] Completed 500 Internal Server Error in 64ms  (0.7ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 63]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 63]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 63], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/63/payments/new" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"63"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "63"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 21]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 63]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.0ms | ActiveRecord: 4.1ms) Started POST "/adherent/members/63/payments" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"63"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "63"]] Completed 500 Internal Server Error in 4ms  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 66]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 66]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 66], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/66/payments/new" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"66"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "66"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 66]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 11.9ms | ActiveRecord: 5.4ms) Started POST "/adherent/members/66/payments" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"66"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "66"]] Completed 500 Internal Server Error in 4ms  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 69]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 69]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 69], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/69/payments/new" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"69"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "69"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 69]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 13.1ms | ActiveRecord: 3.8ms) Started POST "/adherent/members/69/payments" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"69"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "69"]] Completed 500 Internal Server Error in 4ms  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 72]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 72]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 72], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/72/payments/new" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"72"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "72"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 24]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 72]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.6ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/72/payments" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"72"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "72"]] Completed 500 Internal Server Error in 4ms  (0.5ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 75]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 75]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 75], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:43 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/75/payments/new" for 127.0.0.1 at 2014-12-27 07:52:43 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"75"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "75"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 75]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 84ms (Views: 12.5ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/75/payments" for 127.0.0.1 at 2014-12-27 07:52:44 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"75"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "75"]] Completed 500 Internal Server Error in 5ms  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 78]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 78]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 78], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/78/payments/new" for 127.0.0.1 at 2014-12-27 07:52:44 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"78"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "78"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 78]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.6ms | ActiveRecord: 3.2ms) Started POST "/adherent/members/78/payments" for 127.0.0.1 at 2014-12-27 07:52:44 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"78"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "78"]] Completed 500 Internal Server Error in 5ms  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 81]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 81]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 81], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/81/payments/new" for 127.0.0.1 at 2014-12-27 07:52:44 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"81"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "81"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 81]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 15.1ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/81/payments" for 127.0.0.1 at 2014-12-27 07:52:44 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"81"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "81"]] Completed 500 Internal Server Error in 5ms  (0.7ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 84]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 84]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 84], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/84/payments/new" for 127.0.0.1 at 2014-12-27 07:52:44 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"84"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "84"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 84]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.7ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/84/payments" for 127.0.0.1 at 2014-12-27 07:52:44 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"84"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "84"]] Completed 500 Internal Server Error in 5ms  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 29], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 29], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 87]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 87]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 87], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/87/payments/new" for 127.0.0.1 at 2014-12-27 07:52:44 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"87"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "87"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 87]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (88.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 100ms (Views: 91.4ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/87/payments" for 127.0.0.1 at 2014-12-27 07:52:44 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"87"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "87"]] Completed 500 Internal Server Error in 4ms  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 30], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 30], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 90]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 90]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 90], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/90/payments/new" for 127.0.0.1 at 2014-12-27 07:52:44 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"90"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "90"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 90]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 14.4ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/90/payments" for 127.0.0.1 at 2014-12-27 07:52:44 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"90"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "90"]] Completed 500 Internal Server Error in 5ms  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 93]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 93]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 93], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/93/payments/new" for 127.0.0.1 at 2014-12-27 07:52:44 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"93"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 93]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 14.9ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/93/payments" for 127.0.0.1 at 2014-12-27 07:52:44 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"93"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]] Completed 500 Internal Server Error in 4ms  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 96]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 96]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 96], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/96/payments/new" for 127.0.0.1 at 2014-12-27 07:52:44 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"96"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "96"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 96]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.8ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/96/payments" for 127.0.0.1 at 2014-12-27 07:52:44 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"96"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "96"]] Completed 500 Internal Server Error in 4ms  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 99]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 99]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 99], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/99/payments/new" for 127.0.0.1 at 2014-12-27 07:52:44 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"99"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "99"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 99]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 14.0ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/99/payments" for 127.0.0.1 at 2014-12-27 07:52:44 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"99"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "99"]] Completed 500 Internal Server Error in 5ms  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 34], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 34], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 102]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 102]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 102], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/102/payments/new" for 127.0.0.1 at 2014-12-27 07:52:44 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"102"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "102"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 102]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.4ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/102/payments" for 127.0.0.1 at 2014-12-27 07:52:44 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"102"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "102"]] Completed 500 Internal Server Error in 4ms  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5f7d406 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.3ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5fb43b6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5fe1456 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5fe1456%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x6012ec0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x603c0fe @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x603c0fe%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 2.2ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x60612c8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x6065cec @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.2ms)  (0.5ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6080484 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"105"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/105 Completed 302 Found in 7ms (ActiveRecord: 2.1ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"106"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.5ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"107"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/107 Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"108"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 108 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 108 [["name", "Dalton"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/108 Completed 302 Found in 13ms (ActiveRecord: 4.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 48], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/109/coord/new Completed 302 Found in 13ms (ActiveRecord: 4.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 49], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/110/coord/new Completed 302 Found in 13ms (ActiveRecord: 3.8ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 50], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/111/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.8ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.0ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x..fdaf9e91c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x..fdafb19fe @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.7ms | ActiveRecord: 2.7ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.4ms | ActiveRecord: 2.2ms)  (0.6ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 59], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 112]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 112]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 112], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/112/payments/new" for 127.0.0.1 at 2014-12-27 07:52:45 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"112"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "112"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 59]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 112]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.2ms | ActiveRecord: 2.4ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.7ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 60], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 113]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 113]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 113], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/113/payments/new" for 127.0.0.1 at 2014-12-27 07:52:45 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"113"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "113"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 60]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 113]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 86ms (Views: 12.8ms | ActiveRecord: 2.4ms)  (1.1ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 113]] Started POST "/adherent/members/113/payments" for 127.0.0.1 at 2014-12-27 07:52:45 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"113"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "113"]] Completed 500 Internal Server Error in 4ms SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 61], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 114]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 114]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 114], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/114/payments/new" for 127.0.0.1 at 2014-12-27 07:52:45 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"114"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 61]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 114]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.2ms | ActiveRecord: 2.2ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1  (2.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 62], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 115]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 115]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 115], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/115/payments/new" for 127.0.0.1 at 2014-12-27 07:52:45 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"115"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "115"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 62]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 115]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.4ms | ActiveRecord: 2.6ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 63], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 116]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 116]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 116], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 116]] Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 63]] SQL (1.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 116], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 116]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/116/payments/1" for 127.0.0.1 at 2014-12-27 07:52:45 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"116", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "116"]] Adherent::Payment Load (1.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 116]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 116]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 12.0ms | ActiveRecord: 6.8ms) SQL (0.9ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 64], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 117]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 117]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 117], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 64]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 117], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 117]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/117/payments/2" for 127.0.0.1 at 2014-12-27 07:52:45 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"117", "id"=>"2"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 2 LIMIT 1 [["member_id", 117]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (5.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 19.0ms | ActiveRecord: 4.4ms) SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1  (3.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 65], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 118]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 118]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 118], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 118]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 65]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 118], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 118]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/118/payments/3" for 127.0.0.1 at 2014-12-27 07:52:45 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"118", "id"=>"3"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "118"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 3 LIMIT 1 [["member_id", 118]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 118]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.8ms | ActiveRecord: 5.7ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 66], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 119]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 119]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 119], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 119]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 66]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 119], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 119]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/119/payments" for 127.0.0.1 at 2014-12-27 07:52:45 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"119"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "119"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 119]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 119]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 16.6ms | ActiveRecord: 5.3ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (3.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 67], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 120]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 120]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 120], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 67]] SQL (1.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 120], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 120]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/120/payments" for 127.0.0.1 at 2014-12-27 07:52:45 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"120"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 120]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.0ms | ActiveRecord: 4.9ms) Started GET "/adherent/payments/5/reglements/new" for 127.0.0.1 at 2014-12-27 07:52:45 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"5"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 17.2ms | ActiveRecord: 5.9ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.5ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 68], ["updated_at", Sat, 27 Dec 2014 06:52:45 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/121/coord/new" for 127.0.0.1 at 2014-12-27 07:52:45 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"121"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "121"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 121]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 20.1ms | ActiveRecord: 1.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 69], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/122/coord/new" for 127.0.0.1 at 2014-12-27 07:52:46 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"122"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "122"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 122]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 18.2ms | ActiveRecord: 1.7ms) Started POST "/adherent/members/122/coord" for 127.0.0.1 at 2014-12-27 07:52:46 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"122"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "122"]] Completed 500 Internal Server Error in 3ms  (0.5ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 70], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/123/coord/new" for 127.0.0.1 at 2014-12-27 07:52:46 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"123"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 123]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 18.2ms | ActiveRecord: 1.7ms) Started POST "/adherent/members/123/coord" for 127.0.0.1 at 2014-12-27 07:52:46 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"123"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Completed 500 Internal Server Error in 5ms  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 71], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/124/coord/new" for 127.0.0.1 at 2014-12-27 07:52:46 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"124"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "124"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 124]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (14.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 17.7ms | ActiveRecord: 1.7ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/124/coord" for 127.0.0.1 at 2014-12-27 07:52:46 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"124"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "124"]] Completed 500 Internal Server Error in 3ms  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64017a2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x..fdafa95d8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x..fdafbb5e4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x..fdafbb5e4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x653c4b4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x655dfa6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (3.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 70ms (Views: 1.1ms | ActiveRecord: 5.8ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"27/12/2015", "from_date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x50cfd0a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x50cfd0a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.9ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"27/12/2015", "from_date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x57a74b6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"27/12/2015", "from_date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x5b8c356 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5b8c356%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5eaa0e2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5eaa0e2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5f0ab9a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5f3b358 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5f800d4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5f800d4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5fc8032 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5feeeb2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6016336 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x603d062 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x605423a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x6070386 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6070386%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x609cdfa @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.8ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x60c0f48 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x60c0f48%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x60dd8a0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x61179ec @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x613fba4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x613fba4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x616c7d0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 96], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 96], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 125], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 126], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 96]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 126], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 126]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] SQL (1.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 32], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["payment_id", 6], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 97], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 97], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 127], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 128], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 128]] Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 97]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 128], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 128]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 34], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 128]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 97]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 128], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 128]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 34], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 97]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 127], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 127]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 33], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 98], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 98], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 129], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 130], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 98]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 130], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 130]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 36], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 98]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 129], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 129]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 35], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.7ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (1.0ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 37], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]]  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 38], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 39], ["amount", #], ["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]]  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:52:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 3.2ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.7ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (4.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:53:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:53:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:53:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 100], ["updated_at", Sat, 27 Dec 2014 06:53:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/131/coord/new" for 127.0.0.1 at 2014-12-27 07:53:28 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"131"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "131"]] Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 131]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (47.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (57.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 205ms (Views: 174.1ms | ActiveRecord: 5.6ms) Started POST "/adherent/members/131/coord" for 127.0.0.1 at 2014-12-27 07:53:28 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"131"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "131"]] Completed 500 Internal Server Error in 3ms  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:53:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:53:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:53:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 101], ["updated_at", Sat, 27 Dec 2014 06:53:28 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/132/coord/new" for 127.0.0.1 at 2014-12-27 07:53:28 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"132"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 132]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (19.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 21.5ms | ActiveRecord: 1.8ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:53:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:53:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:53:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 102], ["updated_at", Sat, 27 Dec 2014 06:53:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/133/coord/new" for 127.0.0.1 at 2014-12-27 07:53:28 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"133"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "133"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 133]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (19.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (20.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 22.8ms | ActiveRecord: 1.9ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/133/coord" for 127.0.0.1 at 2014-12-27 07:53:28 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"133"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "133"]] Completed 500 Internal Server Error in 3ms  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:53:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:53:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:53:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 103], ["updated_at", Sat, 27 Dec 2014 06:53:28 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/134/coord/new" for 127.0.0.1 at 2014-12-27 07:53:28 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"134"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "134"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 134]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (19.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (20.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 22.6ms | ActiveRecord: 1.7ms) Started POST "/adherent/members/134/coord" for 127.0.0.1 at 2014-12-27 07:53:29 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"134"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "134"]] Completed 500 Internal Server Error in 3ms  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.9ms) DELETE FROM "adherent_members" Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (4.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:57:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:57:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 104) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 104) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:57:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 104], ["updated_at", Sat, 27 Dec 2014 06:57:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/135/coord/new" for 127.0.0.1 at 2014-12-27 07:57:03 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"135"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "135"]] Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 135]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (47.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (57.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 203ms (Views: 172.7ms | ActiveRecord: 5.5ms) Started POST "/adherent/members/135/coord" for 127.0.0.1 at 2014-12-27 07:57:03 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"135"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "135"]] Completed 500 Internal Server Error in 4ms  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:57:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:57:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 105) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 105) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:57:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 105], ["updated_at", Sat, 27 Dec 2014 06:57:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/136/coord/new" for 127.0.0.1 at 2014-12-27 07:57:03 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"136"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "136"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 136]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (20.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (21.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 23.7ms | ActiveRecord: 1.9ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/136/coord" for 127.0.0.1 at 2014-12-27 07:57:03 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"136"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "136"]] Completed 500 Internal Server Error in 3ms  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:57:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:57:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 106) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 106) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:57:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 106], ["updated_at", Sat, 27 Dec 2014 06:57:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/137/coord/new" for 127.0.0.1 at 2014-12-27 07:57:03 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"137"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "137"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 137]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (19.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 21.6ms | ActiveRecord: 1.6ms)  (0.5ms) ROLLBACK  (0.8ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:57:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:57:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 107) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 107) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:57:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 107], ["updated_at", Sat, 27 Dec 2014 06:57:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/138/coord/new" for 127.0.0.1 at 2014-12-27 07:57:03 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"138"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "138"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 138]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (18.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 20.3ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/138/coord" for 127.0.0.1 at 2014-12-27 07:57:03 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"138"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "138"]] Completed 500 Internal Server Error in 4ms  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (1.8ms) DELETE FROM "adherent_members" Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (5.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:58:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:58:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 108) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 108) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:58:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 108], ["updated_at", Sat, 27 Dec 2014 06:58:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/139/coord/new" for 127.0.0.1 at 2014-12-27 07:58:13 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"139"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "139"]] Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 139]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (49.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (60.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (3.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.9ms) Completed 200 OK in 209ms (Views: 178.2ms | ActiveRecord: 5.6ms) Started POST "/adherent/members/139/coord" for 127.0.0.1 at 2014-12-27 07:58:14 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"139"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "139"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 139]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 27 Dec 2014 06:58:14 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 139], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 06:58:14 UTC +00:00], ["zip", ""]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/139/adhesions/new Completed 302 Found in 12ms (ActiveRecord: 3.9ms) Started GET "/adherent/members/139/adhesions/new" for 127.0.0.1 at 2014-12-27 07:58:14 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"139"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "139"]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 139]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 139]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (12.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 94ms (Views: 19.2ms | ActiveRecord: 6.2ms)  (1.0ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:58:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:58:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 109) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 109) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:58:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 109], ["updated_at", Sat, 27 Dec 2014 06:58:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/140/coord/new" for 127.0.0.1 at 2014-12-27 07:58:14 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"140"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "140"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 140]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (17.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 19.2ms | ActiveRecord: 1.6ms) Started POST "/adherent/members/140/coord" for 127.0.0.1 at 2014-12-27 07:58:14 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"140"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "140"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 140]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 27 Dec 2014 06:58:14 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 140], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 06:58:14 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/140/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 3.2ms) Started GET "/adherent/members/140/adhesions/new" for 127.0.0.1 at 2014-12-27 07:58:14 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"140"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "140"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 140]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 140]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (10.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.9ms | ActiveRecord: 2.6ms) Adherent::Coord Load (1.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 140]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:58:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:58:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 110) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 110) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:58:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 110], ["updated_at", Sat, 27 Dec 2014 06:58:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/141/coord/new" for 127.0.0.1 at 2014-12-27 07:58:14 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"141"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "141"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 141]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (19.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 23.6ms | ActiveRecord: 1.5ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/141/coord" for 127.0.0.1 at 2014-12-27 07:58:14 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"141"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "141"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 141]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 27 Dec 2014 06:58:14 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 141], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 06:58:14 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/141/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 3.0ms) Started GET "/adherent/members/141/adhesions/new" for 127.0.0.1 at 2014-12-27 07:58:14 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"141"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "141"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 141]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 141]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.6ms | ActiveRecord: 2.1ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:58:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 06:58:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 111) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 111) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 06:58:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 111], ["updated_at", Sat, 27 Dec 2014 06:58:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/142/coord/new" for 127.0.0.1 at 2014-12-27 07:58:14 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"142"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "142"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 142]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (18.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 20.7ms | ActiveRecord: 1.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.7ms) SAVEPOINT active_record_1 SQL (4.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:06:42 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:06:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 112) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 112) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:06:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 112], ["updated_at", Sat, 27 Dec 2014 07:06:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/143/coord/new" for 127.0.0.1 at 2014-12-27 08:06:42 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"143"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "143"]] Adherent::Coord Load (1.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 143]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (52.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (109.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (2.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.8ms) Completed 200 OK in 267ms (Views: 231.4ms | ActiveRecord: 7.2ms) Started POST "/adherent/members/143/coord" for 127.0.0.1 at 2014-12-27 08:06:42 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"143"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "143"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 143]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 27 Dec 2014 07:06:42 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 143], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:06:42 UTC +00:00], ["zip", ""]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/143/adhesions/new Completed 302 Found in 13ms (ActiveRecord: 3.7ms) Started GET "/adherent/members/143/adhesions/new" for 127.0.0.1 at 2014-12-27 08:06:42 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"143"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "143"]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 143]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 143]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (13.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 45ms (Views: 17.0ms | ActiveRecord: 6.4ms) Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 143]]  (0.8ms) ROLLBACK  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:06:42 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:06:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 113) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 113) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:06:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 113], ["updated_at", Sat, 27 Dec 2014 07:06:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/144/coord/new" for 127.0.0.1 at 2014-12-27 08:06:42 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"144"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "144"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 144]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (20.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 22.5ms | ActiveRecord: 1.1ms) Started POST "/adherent/members/144/coord" for 127.0.0.1 at 2014-12-27 08:06:42 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"144"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "144"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 144]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 27 Dec 2014 07:06:42 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 144], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:06:42 UTC +00:00], ["zip", ""]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/144/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 3.5ms) Started GET "/adherent/members/144/adhesions/new" for 127.0.0.1 at 2014-12-27 08:06:42 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"144"} Organism Load (1.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "144"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 144]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 144]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.1ms | ActiveRecord: 3.6ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:06:43 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:06:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 114) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 114) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:06:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 114], ["updated_at", Sat, 27 Dec 2014 07:06:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/145/coord/new" for 127.0.0.1 at 2014-12-27 08:06:43 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"145"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "145"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 145]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (19.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 22.0ms | ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:06:43 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:06:43 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 115) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 115) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:06:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 115], ["updated_at", Sat, 27 Dec 2014 07:06:43 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/146/coord/new" for 127.0.0.1 at 2014-12-27 08:06:43 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"146"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "146"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 146]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (16.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 18.6ms | ActiveRecord: 1.6ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/146/coord" for 127.0.0.1 at 2014-12-27 08:06:43 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"146"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "146"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 146]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 27 Dec 2014 07:06:43 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 146], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:06:43 UTC +00:00], ["zip", ""]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/146/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 3.0ms) Started GET "/adherent/members/146/adhesions/new" for 127.0.0.1 at 2014-12-27 08:06:43 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"146"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "146"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 146]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 146]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.8ms | ActiveRecord: 2.1ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (1.6ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (5.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 116) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 116) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 116], ["updated_at", Sat, 27 Dec 2014 07:07:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/147/coord/new" for 127.0.0.1 at 2014-12-27 08:07:20 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"147"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "147"]] Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 147]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (50.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (60.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.1ms) Completed 200 OK in 211ms (Views: 181.3ms | ActiveRecord: 5.9ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/147/coord" for 127.0.0.1 at 2014-12-27 08:07:20 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"147"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "147"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 147]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 27 Dec 2014 07:07:20 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 147], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:07:20 UTC +00:00], ["zip", ""]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/147/adhesions/new Completed 302 Found in 11ms (ActiveRecord: 3.7ms) Started GET "/adherent/members/147/adhesions/new" for 127.0.0.1 at 2014-12-27 08:07:20 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"147"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "147"]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 147]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 147]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (12.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 92ms (Views: 16.8ms | ActiveRecord: 7.0ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.8ms) ROLLBACK  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 117) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 117) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 117], ["updated_at", Sat, 27 Dec 2014 07:07:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/148/coord/new" for 127.0.0.1 at 2014-12-27 08:07:20 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"148"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "148"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 148]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (19.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 22.0ms | ActiveRecord: 1.8ms) Started POST "/adherent/members/148/coord" for 127.0.0.1 at 2014-12-27 08:07:20 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"148"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "148"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 148]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 27 Dec 2014 07:07:20 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 148], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:07:20 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/148/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 3.4ms) Started GET "/adherent/members/148/adhesions/new" for 127.0.0.1 at 2014-12-27 08:07:20 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"148"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "148"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 148]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 148]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.2ms | ActiveRecord: 2.2ms) Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 148]]  (0.4ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 118) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 118) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 118], ["updated_at", Sat, 27 Dec 2014 07:07:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/149/coord/new" for 127.0.0.1 at 2014-12-27 08:07:21 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"149"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "149"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 149]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (19.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 21.2ms | ActiveRecord: 1.7ms) Started POST "/adherent/members/149/coord" for 127.0.0.1 at 2014-12-27 08:07:21 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"149"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "149"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 149]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 27 Dec 2014 07:07:21 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 149], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:07:21 UTC +00:00], ["zip", ""]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/149/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 3.6ms) Started GET "/adherent/members/149/adhesions/new" for 127.0.0.1 at 2014-12-27 08:07:21 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"149"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "149"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 149]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 149]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.6ms | ActiveRecord: 2.3ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 119) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 119) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 119], ["updated_at", Sat, 27 Dec 2014 07:07:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/150/coord/new" for 127.0.0.1 at 2014-12-27 08:07:21 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"150"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "150"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 150]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (18.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 20.4ms | ActiveRecord: 2.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (1.0ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (4.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:37 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 120) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 120) LIMIT 1 SQL (2.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:37 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 120], ["updated_at", Sat, 27 Dec 2014 07:07:37 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 151]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 151]]  (0.6ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 151], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/151/payments/new" for 127.0.0.1 at 2014-12-27 08:07:38 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"151"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "151"]] Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 120]] Adherent::Adhesion Load (2.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 151]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (80.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (89.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 239ms (Views: 206.4ms | ActiveRecord: 7.7ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 121) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 121) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 121], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 152]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 152]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 152], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/152/payments/new" for 127.0.0.1 at 2014-12-27 08:07:38 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"152"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "152"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 121]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 152]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 10.5ms | ActiveRecord: 2.2ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 122) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 122) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 122], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 153]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 153]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 153], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 153]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 122]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 153], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 153]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/153/payments/12" for 127.0.0.1 at 2014-12-27 08:07:38 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"153", "id"=>"12"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "153"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 12 LIMIT 1 [["member_id", 153]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 153]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (33.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 43ms (Views: 32.9ms | ActiveRecord: 6.1ms) SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 123) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 123) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 123], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 154]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 154]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 154], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]] Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 123]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 154], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 154]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/154/payments/13" for 127.0.0.1 at 2014-12-27 08:07:38 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"154", "id"=>"13"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "154"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 13 LIMIT 1 [["member_id", 154]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (13.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.0ms | ActiveRecord: 4.3ms) SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 124) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 124) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 124], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 155]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 155]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 155], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 155]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 124]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 155], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 155]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/155/payments/14" for 127.0.0.1 at 2014-12-27 08:07:38 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"155", "id"=>"14"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "155"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 14 LIMIT 1 [["member_id", 155]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 155]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.1ms | ActiveRecord: 4.4ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (1.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 125) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 125) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 125], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 156]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 156]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 156], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/156/payments/new" for 127.0.0.1 at 2014-12-27 08:07:38 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"156"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "156"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 125]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 156]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.6ms | ActiveRecord: 2.1ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 126) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 126) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 126], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 157]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 157]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 157], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/157/payments/new" for 127.0.0.1 at 2014-12-27 08:07:38 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"157"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "157"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 126]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 157]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (66.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (68.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 77ms (Views: 70.3ms | ActiveRecord: 1.8ms)  (1.1ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 157]] Started POST "/adherent/members/157/payments" for 127.0.0.1 at 2014-12-27 08:07:38 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"157"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "157"]] Completed 500 Internal Server Error in 4ms SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 127) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 127) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 127], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 158]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 158]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 158], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 158]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 127]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 158], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 158]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/158/payments" for 127.0.0.1 at 2014-12-27 08:07:38 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"158"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "158"]] Adherent::Payment Load (1.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 158]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 158]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (22.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 21.3ms | ActiveRecord: 4.7ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 128) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 128) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 128], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 159]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 159]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 159], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 128]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 159], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 159]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/159/payments" for 127.0.0.1 at 2014-12-27 08:07:38 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"159"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "159"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 159]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.2ms | ActiveRecord: 4.0ms) Started GET "/adherent/payments/16/reglements/new" for 127.0.0.1 at 2014-12-27 08:07:38 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"16"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 17.1ms | ActiveRecord: 5.4ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:38 UTC +00:00]]  (120.3ms) COMMIT Adherent::Member Exists (2.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 129) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (1.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 129) LIMIT 1 SQL (2.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 129], ["updated_at", Sat, 27 Dec 2014 07:07:39 UTC +00:00]]  (3.8ms) COMMIT Adherent::Member Exists (2.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 129) LIMIT 1  (1.1ms) BEGIN Adherent::Member Exists (2.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 129) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 129], ["updated_at", Sat, 27 Dec 2014 07:07:39 UTC +00:00]]  (13.8ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 129) LIMIT 1  (1.1ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 129) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 129], ["updated_at", Sat, 27 Dec 2014 07:07:39 UTC +00:00]]  (2.1ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 129) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 129) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 129], ["updated_at", Sat, 27 Dec 2014 07:07:39 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 129) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 129) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 129], ["updated_at", Sat, 27 Dec 2014 07:07:39 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.5ms) BEGIN Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 160]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 129]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:39 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 160], ["mode", "Chèque"], ["updated_at", Sat, 27 Dec 2014 07:07:39 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 160]]  (1.4ms) COMMIT Started GET "/adherent/members/160/payments/17" for 127.0.0.1 at 2014-12-27 08:07:43 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"160", "id"=>"17"} Organism Load (2.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "160"]] Adherent::Payment Load (1.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 17 LIMIT 1 [["member_id", 160]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 160]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (3.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (32.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 62ms (Views: 30.8ms | ActiveRecord: 22.4ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2014-12-27 08:07:43 +0100 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2014-12-27 08:07:43 +0100 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2014-12-27 08:07:43 +0100 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2014-12-27 08:07:43 +0100 Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2014-12-27 08:07:43 +0100 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2014-12-27 08:07:43 +0100 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2014-12-27 08:07:43 +0100 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2014-12-27 08:07:43 +0100 Started DELETE "/adherent/members/160/payments/17" for 127.0.0.1 at 2014-12-27 08:07:44 +0100 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"160", "id"=>"17"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "160"]] Adherent::Payment Load (1.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 160], ["id", "17"]]  (0.1ms) BEGIN Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] SQL (0.5ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 17]]  (208.3ms) COMMIT Redirected to http://127.0.0.1:35789/adherent/members/160/payments Completed 302 Found in 242ms (ActiveRecord: 226.2ms) Started GET "/adherent/members/160/payments" for 127.0.0.1 at 2014-12-27 08:07:44 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"160"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "160"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 160]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (61.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 68ms (Views: 63.5ms | ActiveRecord: 2.2ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2014-12-27 08:07:44 +0100  (1.2ms) SELECT COUNT(*) FROM "adherent_payments"  (0.5ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (2.4ms) select table_name from information_schema.views where table_schema = 'adh_test'  (38.3ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "adherent_reglements", "organisms", "adherent_members", "adherent_payments" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) BEGIN SQL (1.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:45 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:07:45 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:07:45 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:07:45 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:07:45 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:07:45 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:07:45 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (2.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]] Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (62.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 70ms (Views: 53.5ms | ActiveRecord: 13.5ms) Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2014-12-27 08:07:45 +0100 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2014-12-27 08:07:45 +0100 Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2014-12-27 08:07:45 +0100 Started GET "/assets/images/sort_asc.png" for 127.0.0.1 at 2014-12-27 08:07:45 +0100 Started GET "/assets/images/back_disabled.png" for 127.0.0.1 at 2014-12-27 08:07:45 +0100 Started GET "/assets/images/sort_both.png" for 127.0.0.1 at 2014-12-27 08:07:45 +0100 Started GET "/assets/images/forward_disabled.png" for 127.0.0.1 at 2014-12-27 08:07:45 +0100 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2014-12-27 08:07:46 +0100 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (5.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.1ms) BEGIN Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] SQL (1.3ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (116.0ms) COMMIT Redirected to http://127.0.0.1:35789/adherent/members Completed 302 Found in 137ms (ActiveRecord: 123.6ms) Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:07:46 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (2.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (1.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (36.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 48ms (Views: 26.7ms | ActiveRecord: 18.4ms)  (2.9ms) SELECT COUNT(*) FROM "adherent_members"  (3.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (6.3ms) select table_name from information_schema.views where table_schema = 'adh_test'  (139.4ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "organisms", "adherent_members", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (1.3ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:47 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:47 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:07:47 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:47 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:07:47 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:47 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:07:47 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:47 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:07:47 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:47 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:07:47 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.3ms) BEGIN SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:47 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:47 UTC +00:00]]  (1.3ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2014-12-27 08:07:47 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (2.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (1.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (17.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 43ms (Views: 19.0ms | ActiveRecord: 16.3ms) Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2014-12-27 08:07:47 +0100 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (6.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (114.8ms) COMMIT Redirected to http://127.0.0.1:35789/adherent/members/1/adhesions Completed 302 Found in 131ms (ActiveRecord: 124.6ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2014-12-27 08:07:47 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (1.0ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:35789/adherent/members/1/adhesions/new Completed 302 Found in 8ms (ActiveRecord: 2.6ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2014-12-27 08:07:47 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (69.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 82ms (Views: 72.3ms | ActiveRecord: 4.9ms) Started GET "/assets/adherent/cal.gif" for 127.0.0.1 at 2014-12-27 08:07:48 +0100  (3.5ms) SELECT COUNT(*) FROM "adherent_adhesions"  (1.7ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (132.3ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "adherent_reglements", "organisms", "adherent_members", "adherent_payments" RESTART IDENTITY CASCADE;  (0.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL  (0.2ms) BEGIN  (0.5ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:07:49 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (35.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40ms (Views: 31.5ms | ActiveRecord: 7.1ms)  (0.7ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 2], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 2], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 2], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 2], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:07:49 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 2]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 6]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 6]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 7]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 8]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 9]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 9]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 10]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (38.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 42ms (Views: 34.3ms | ActiveRecord: 6.6ms)  (0.5ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 3], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 3], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 3], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 3], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:07:49 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 3]]  (1.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]] Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 11]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 12]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 12]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 13]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 13]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 14]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 15]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (37.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 42ms (Views: 28.0ms | ActiveRecord: 12.2ms) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/11/payments" for 127.0.0.1 at 2014-12-27 08:07:49 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"11"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 11]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (4.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 12ms (Views: 5.7ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 4], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 4], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 4], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 4], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:07:49 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 4]]  (2.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 16]] Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 16]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 17]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 18]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 18]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 19]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 19]]  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 20]] Adherent::Coord Load (1.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (39.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 44ms (Views: 30.1ms | ActiveRecord: 12.4ms) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/16/adhesions" for 127.0.0.1 at 2014-12-27 08:07:49 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"16"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 16]] Redirected to http://www.example.com/adherent/members/16/adhesions/new Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/adherent/members/16/adhesions/new" for 127.0.0.1 at 2014-12-27 08:07:49 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"16"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 16]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.6ms | ActiveRecord: 2.8ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 5], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 5], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 5], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 5], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 5], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:07:49 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 5]]  (1.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 21]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 21]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 22]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 22]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 23]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 23]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 24]] Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 24]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 25]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (106.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 111ms (Views: 98.9ms | ActiveRecord: 10.9ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/21/edit" for 127.0.0.1 at 2014-12-27 08:07:49 +0100 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"21"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "21"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (17.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/edit.html.erb within layouts/adherent/application (22.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 31ms (Views: 27.5ms | ActiveRecord: 1.1ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 6], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 6], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 6], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 6], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 6], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:07:49 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 6]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 26]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 27]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 27]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 28]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 28]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 29]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 29]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 30]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 30]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (29.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 26.6ms | ActiveRecord: 6.0ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 26]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 26]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 26], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/26/adhesions" for 127.0.0.1 at 2014-12-27 08:07:49 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"26"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Adhesion Exists (1.3ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 26]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 26]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (7.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 8.7ms | ActiveRecord: 3.9ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 7], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1  (1.0ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 7], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 7], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 7], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 7], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:07:49 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 7]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 31]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 31]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 32]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 32]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 33]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 33]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 34]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 34]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 35]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (30.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 36ms (Views: 28.6ms | ActiveRecord: 5.8ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2014-12-27 08:07:49 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/new.html.erb within layouts/adherent/application (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 14.5ms | ActiveRecord: 0.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.9ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 8], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 8], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 8], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 8], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 8], ["updated_at", Sat, 27 Dec 2014 07:07:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:07:49 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 8]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 36]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 36]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 37]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 37]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 38]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 38]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 39]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 39]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 40]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 40]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (32.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 37ms (Views: 28.3ms | ActiveRecord: 7.3ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/36/coord" for 127.0.0.1 at 2014-12-27 08:07:49 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"36"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 36]] Redirected to http://www.example.com/adherent/members/36/coord/new Completed 302 Found in 8ms (ActiveRecord: 1.8ms) Started GET "/adherent/members/36/coord/new" for 127.0.0.1 at 2014-12-27 08:07:49 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"36"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 36]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (83.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (86.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 109ms (Views: 91.5ms | ActiveRecord: 4.1ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 9], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 9], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 9], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 9], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 9], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 9]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 41]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 41]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 42]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 42]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 43]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 43]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 44]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 45]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 45]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (36.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40ms (Views: 32.5ms | ActiveRecord: 6.6ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["member_id", 41], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 41]] Started GET "/adherent/members/41/coord" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"41"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 41]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/show.html.erb within layouts/adherent/application (2.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 6.5ms | ActiveRecord: 1.7ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 10], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 10], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 10], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 10], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 10], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/new.html.erb within layouts/adherent/application (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 12.2ms | ActiveRecord: 0.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 10], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/51/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.1ms) Started GET "/adherent/members/51/coord/new" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"51"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "51"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 51]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (16.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 18.8ms | ActiveRecord: 1.6ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.5ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 11], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (1.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 11], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 11], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 52]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 52]]  (1.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 52], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/52/payments/new" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"52"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "52"]] Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 11]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 52]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 10.2ms | ActiveRecord: 4.5ms) Started POST "/adherent/members/52/payments" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"52"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "52"]] Completed 500 Internal Server Error in 4ms  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 12], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 12], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 12], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 55]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 55]]  (0.7ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 55], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/55/payments/new" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"55"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "55"]] Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 12]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 55]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 11.1ms | ActiveRecord: 7.7ms) Started POST "/adherent/members/55/payments" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"55"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "55"]] Completed 500 Internal Server Error in 5ms  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 13], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 13], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 13], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 58]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 58]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 58], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/58/payments/new" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"58"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "58"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 58]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (78.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (79.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 92ms (Views: 81.8ms | ActiveRecord: 4.0ms) Started POST "/adherent/members/58/payments" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"58"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "58"]] Completed 500 Internal Server Error in 5ms  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 14], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 14], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 61]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 61]]  (0.5ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 61], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/61/payments/new" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"61"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "61"]] Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 61]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 13.3ms | ActiveRecord: 6.0ms) Started POST "/adherent/members/61/payments" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"61"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "61"]] Completed 500 Internal Server Error in 4ms  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 15], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 15], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 64]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 64]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 64], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/64/payments/new" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"64"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "64"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 64]]  (1.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 12.5ms | ActiveRecord: 3.8ms) Started POST "/adherent/members/64/payments" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"64"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "64"]] Completed 500 Internal Server Error in 6ms  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 16], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 16], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 16], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 67]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 67]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 67], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/67/payments/new" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"67"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "67"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 67]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.3ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/67/payments" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"67"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "67"]] Completed 500 Internal Server Error in 5ms  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 17], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 17], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 17], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 70]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 70]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 70], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/70/payments/new" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"70"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 70]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.8ms | ActiveRecord: 3.2ms) Started POST "/adherent/members/70/payments" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"70"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]] Completed 500 Internal Server Error in 4ms  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 18], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 18], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 73]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 73]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 73], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/73/payments/new" for 127.0.0.1 at 2014-12-27 08:07:50 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"73"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "73"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 73]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.9ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/73/payments" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"73"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "73"]] Completed 500 Internal Server Error in 4ms  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.9ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 76]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 76]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 76], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/76/payments/new" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"76"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "76"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 76]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.1ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/76/payments" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"76"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "76"]] Completed 500 Internal Server Error in 6ms  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (1.0ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 79]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 79]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 79], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/79/payments/new" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"79"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "79"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 79]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.3ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/79/payments" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"79"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "79"]] Completed 500 Internal Server Error in 4ms  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 82]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 82]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 82], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/82/payments/new" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"82"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "82"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 21]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 82]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.9ms | ActiveRecord: 3.5ms) Started POST "/adherent/members/82/payments" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"82"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "82"]] Completed 500 Internal Server Error in 3ms  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (2.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 85]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 85]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 85], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/85/payments/new" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"85"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "85"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 85]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.8ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/85/payments" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"85"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "85"]] Completed 500 Internal Server Error in 5ms  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.0ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 88]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 88]]  (1.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 88], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 88]] Started GET "/adherent/members/88/payments/new" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"88"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "88"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 88]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.5ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/88/payments" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"88"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "88"]] Completed 500 Internal Server Error in 4ms  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 91]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 91]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 91], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/91/payments/new" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"91"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "91"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 24]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 91]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.1ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/91/payments" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"91"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "91"]] Completed 500 Internal Server Error in 3ms  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 94]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 94]]  (1.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 94], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/94/payments/new" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"94"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "94"]] Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 94]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 11.9ms | ActiveRecord: 3.9ms) Started POST "/adherent/members/94/payments" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"94"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "94"]] Completed 500 Internal Server Error in 3ms  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 97]] Adherent::Adhesion Load (1.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 97]]  (0.5ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 97], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/97/payments/new" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"97"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "97"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 97]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 13.6ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/97/payments" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"97"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "97"]] Completed 500 Internal Server Error in 4ms  (0.2ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/100/adhesions/new" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"100"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "100"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 100]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 100]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.4ms | ActiveRecord: 2.8ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/101/adhesions/new" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"101"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "101"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 101]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 101]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (6.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.1ms | ActiveRecord: 2.3ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 101]] Started POST "/adherent/members/101/adhesions" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"101"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "101"]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 101], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/101/adhesions Completed 302 Found in 9ms (ActiveRecord: 1.7ms) Started GET "/adherent/members/101/adhesions" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"101"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "101"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 101]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 101]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 9.1ms | ActiveRecord: 2.5ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 101]] SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 102], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/102/adhesions" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"102"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "102"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 102]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 102]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 9.9ms | ActiveRecord: 2.5ms) SQL (1.0ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 103], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:07:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/103/adhesions" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"103"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "103"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 103]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 103]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.4ms | ActiveRecord: 2.4ms) Started GET "/adherent/members/103/adhesions/20/edit" for 127.0.0.1 at 2014-12-27 08:07:51 +0100 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"103", "id"=>"20"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "103"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 103], ["id", "20"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (78.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/edit.html.erb within layouts/adherent/application (80.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 88ms (Views: 83.6ms | ActiveRecord: 1.4ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 104], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/104/adhesions" for 127.0.0.1 at 2014-12-27 08:07:52 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"104"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "104"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 104]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 104]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] CACHE (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 8.7ms | ActiveRecord: 2.9ms) Started GET "/adherent/members/104/payments/new" for 127.0.0.1 at 2014-12-27 08:07:52 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"104"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "104"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 104]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 14.1ms | ActiveRecord: 3.0ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/105/coord/new" for 127.0.0.1 at 2014-12-27 08:07:52 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"105"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "105"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 105]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (17.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 20.9ms | ActiveRecord: 1.5ms) Started POST "/adherent/members/105/coord" for 127.0.0.1 at 2014-12-27 08:07:52 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"105"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "105"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 105]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 105], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/105/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 3.6ms) Started GET "/adherent/members/105/adhesions/new" for 127.0.0.1 at 2014-12-27 08:07:52 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"105"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "105"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 105]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 105]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.9ms | ActiveRecord: 1.9ms) Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 105]]  (0.7ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/106/coord/new" for 127.0.0.1 at 2014-12-27 08:07:52 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"106"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "106"]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 106]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (16.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 18.7ms | ActiveRecord: 1.4ms) Started POST "/adherent/members/106/coord" for 127.0.0.1 at 2014-12-27 08:07:52 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"106"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "106"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 106]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 106], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00], ["zip", ""]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/106/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 3.5ms) Started GET "/adherent/members/106/adhesions/new" for 127.0.0.1 at 2014-12-27 08:07:52 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"106"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "106"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 106]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 106]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.8ms | ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/107/coord/new" for 127.0.0.1 at 2014-12-27 08:07:52 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"107"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "107"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 107]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (17.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 19.9ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 35], ["updated_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/108/coord/new" for 127.0.0.1 at 2014-12-27 08:07:52 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"108"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 108]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 17.6ms | ActiveRecord: 1.5ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/108/coord" for 127.0.0.1 at 2014-12-27 08:07:52 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"108"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 108]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 108], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:07:52 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/108/adhesions/new Completed 302 Found in 11ms (ActiveRecord: 4.0ms) Started GET "/adherent/members/108/adhesions/new" for 127.0.0.1 at 2014-12-27 08:07:52 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"108"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 108]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 108]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.8ms | ActiveRecord: 2.5ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (2.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (4.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 36], ["updated_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 36], ["updated_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 36], ["updated_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 109]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 109]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 109], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/109/payments/new" for 127.0.0.1 at 2014-12-27 08:13:18 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"109"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "109"]] Organism Load (2.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Adhesion Load (2.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 109]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (30.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (39.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 205ms (Views: 161.5ms | ActiveRecord: 12.4ms) Started POST "/adherent/members/109/payments" for 127.0.0.1 at 2014-12-27 08:13:18 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"109"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "109"]] Completed 500 Internal Server Error in 4ms  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 37], ["updated_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 37], ["updated_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 37], ["updated_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 112]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 112]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 112], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/112/payments/new" for 127.0.0.1 at 2014-12-27 08:13:18 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"112"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "112"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 37]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 112]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 10.9ms | ActiveRecord: 3.8ms) Started POST "/adherent/members/112/payments" for 127.0.0.1 at 2014-12-27 08:13:18 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"112"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "112"]] Completed 500 Internal Server Error in 5ms  (0.8ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 38], ["updated_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 38], ["updated_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 38], ["updated_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 115]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 115]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 115], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/115/payments/new" for 127.0.0.1 at 2014-12-27 08:13:18 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"115"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "115"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 115]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.6ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/115/payments" for 127.0.0.1 at 2014-12-27 08:13:18 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"115"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "115"]] Completed 500 Internal Server Error in 6ms  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 39], ["updated_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 39], ["updated_at", Sat, 27 Dec 2014 07:13:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 39], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 118]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 118]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 118], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (1.1ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 118]] Started GET "/adherent/members/118/payments/new" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"118"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "118"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 39]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 118]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 14.6ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/118/payments" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"118"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "118"]] Completed 500 Internal Server Error in 4ms  (0.3ms) ROLLBACK  (0.7ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 40], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 40], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 40], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 121]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 121]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 121], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/121/payments/new" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"121"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "121"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 40]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 121]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 10.7ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/121/payments" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"121"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "121"]] Completed 500 Internal Server Error in 4ms  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 41], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 41], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 41], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 124]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 124]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 124], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/124/payments/new" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"124"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "124"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 41]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 124]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.5ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/124/payments" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"124"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "124"]] Completed 500 Internal Server Error in 4ms  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 42], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 42], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 42], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 127]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 127]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 127], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/127/payments/new" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"127"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "127"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 42]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 127]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 78ms (Views: 11.9ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/127/payments" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"127"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "127"]] Completed 500 Internal Server Error in 5ms  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1  (1.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 43], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 43], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 43], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 130]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 130]]  (0.4ms) SAVEPOINT active_record_1 SQL (2.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 130], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/130/payments/new" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"130"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "130"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 43]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 130]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.6ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/130/payments" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"130"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "130"]] Completed 500 Internal Server Error in 5ms  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.6ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 44], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 44], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 44], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 133]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 133]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 133], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/133/payments/new" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"133"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "133"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 44]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 133]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.4ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/133/payments" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"133"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "133"]] Completed 500 Internal Server Error in 5ms  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 45], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 45) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 45) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 45], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 45) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 45) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 45], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 136]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 136]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 136], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/136/payments/new" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"136"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "136"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 45]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 136]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.9ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/136/payments" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"136"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "136"]] Completed 500 Internal Server Error in 4ms  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 46], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 46], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 46], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 139]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 139]]  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 139], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/139/payments/new" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"139"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "139"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 46]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 139]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 10.5ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/139/payments" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"139"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "139"]] Completed 500 Internal Server Error in 4ms  (0.6ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 47], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 47], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 47], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 142]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 142]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 142], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/142/payments/new" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"142"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "142"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 47]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 142]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.0ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/142/payments" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"142"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "142"]] Completed 500 Internal Server Error in 6ms  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 48], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 48], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 48], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 145]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 145]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 145], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/145/payments/new" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"145"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "145"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 48]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 145]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.3ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/145/payments" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"145"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "145"]] Completed 500 Internal Server Error in 4ms  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 49], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 49], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 49], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 148]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 148]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 148], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/148/payments/new" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"148"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "148"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 49]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 148]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 10.6ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/148/payments" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"148"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "148"]] Completed 500 Internal Server Error in 4ms  (4.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 50], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 50], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 50], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 151]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 151]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 151], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/151/payments/new" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"151"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "151"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 50]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 151]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.8ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/151/payments" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"151"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "151"]] Completed 500 Internal Server Error in 4ms  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 51], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 51], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 51], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 154]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 154]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 154], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/154/payments/new" for 127.0.0.1 at 2014-12-27 08:13:19 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"154"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "154"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 51]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 154]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.2ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/154/payments" for 127.0.0.1 at 2014-12-27 08:13:20 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"154"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "154"]] Completed 500 Internal Server Error in 3ms  (0.4ms) ROLLBACK SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) BEGIN SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:20 UTC +00:00]]  (70.7ms) COMMIT Adherent::Member Exists (2.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.7ms) BEGIN Adherent::Member Exists (1.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 52], ["updated_at", Sat, 27 Dec 2014 07:13:20 UTC +00:00]]  (27.4ms) COMMIT Adherent::Member Exists (1.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 52) LIMIT 1  (2.1ms) BEGIN Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (2.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 52], ["updated_at", Sat, 27 Dec 2014 07:13:20 UTC +00:00]]  (3.1ms) COMMIT Adherent::Member Exists (2.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 52], ["updated_at", Sat, 27 Dec 2014 07:13:20 UTC +00:00]]  (3.6ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 52], ["updated_at", Sat, 27 Dec 2014 07:13:20 UTC +00:00]]  (2.6ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 52], ["updated_at", Sat, 27 Dec 2014 07:13:20 UTC +00:00]]  (2.2ms) COMMIT Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) BEGIN Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 52]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:20 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 157], ["mode", "Chèque"], ["updated_at", Sat, 27 Dec 2014 07:13:20 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 157]]  (1.5ms) COMMIT Started GET "/adherent/members/157/payments/1" for 127.0.0.1 at 2014-12-27 08:13:24 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"157", "id"=>"1"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "157"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 157]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (46.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 72ms (Views: 45.4ms | ActiveRecord: 16.9ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2014-12-27 08:13:24 +0100 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2014-12-27 08:13:24 +0100 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2014-12-27 08:13:24 +0100 Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2014-12-27 08:13:24 +0100 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2014-12-27 08:13:24 +0100 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2014-12-27 08:13:24 +0100 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2014-12-27 08:13:24 +0100 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2014-12-27 08:13:24 +0100 Started DELETE "/adherent/members/157/payments/1" for 127.0.0.1 at 2014-12-27 08:13:25 +0100 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"157", "id"=>"1"} Organism Load (2.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "157"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 157], ["id", "1"]]  (0.2ms) BEGIN Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] SQL (0.6ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (197.5ms) COMMIT Redirected to http://127.0.0.1:45237/adherent/members/157/payments Completed 302 Found in 226ms (ActiveRecord: 202.1ms) Started GET "/adherent/members/157/payments" for 127.0.0.1 at 2014-12-27 08:13:25 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"157"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "157"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 157]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.7ms | ActiveRecord: 2.8ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2014-12-27 08:13:25 +0100  (3.0ms) SELECT COUNT(*) FROM "adherent_payments"  (1.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (2.5ms) select table_name from information_schema.views where table_schema = 'adh_test'  (192.6ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "organisms", "adherent_members", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (1.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (1.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:26 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:13:26 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:13:26 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:13:26 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:13:26 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:13:26 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:13:26 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (1.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]] Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (60.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 67ms (Views: 52.0ms | ActiveRecord: 12.3ms) Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2014-12-27 08:13:26 +0100 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2014-12-27 08:13:26 +0100 Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2014-12-27 08:13:26 +0100 Started GET "/assets/images/sort_asc.png" for 127.0.0.1 at 2014-12-27 08:13:26 +0100 Started GET "/assets/images/sort_both.png" for 127.0.0.1 at 2014-12-27 08:13:26 +0100 Started GET "/assets/images/back_disabled.png" for 127.0.0.1 at 2014-12-27 08:13:26 +0100 Started GET "/assets/images/forward_disabled.png" for 127.0.0.1 at 2014-12-27 08:13:26 +0100 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2014-12-27 08:13:27 +0100 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (4.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.1ms) BEGIN Adherent::Coord Load (2.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] SQL (0.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (141.3ms) COMMIT Redirected to http://127.0.0.1:45237/adherent/members Completed 302 Found in 158ms (ActiveRecord: 148.8ms) Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:13:27 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (2.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (1.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (35.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 49ms (Views: 25.5ms | ActiveRecord: 20.8ms)  (2.9ms) SELECT COUNT(*) FROM "adherent_members"  (1.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (3.9ms) select table_name from information_schema.views where table_schema = 'adh_test'  (95.0ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.9ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.9ms) DELETE FROM "adherent_members" Organism Load (1.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) BEGIN SQL (2.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:28 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (4.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:13:28 UTC +00:00]]  (2.5ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:13:28 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:13:28 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:13:28 UTC +00:00]]  (1.0ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:13:28 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (1.3ms) BEGIN SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:28 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:28 UTC +00:00]]  (1.5ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2014-12-27 08:13:28 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.9ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.9ms | ActiveRecord: 4.8ms) Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2014-12-27 08:13:29 +0100 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (3.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (122.3ms) COMMIT Redirected to http://127.0.0.1:45237/adherent/members/1/adhesions Completed 302 Found in 138ms (ActiveRecord: 128.4ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2014-12-27 08:13:29 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (1.2ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:45237/adherent/members/1/adhesions/new Completed 302 Found in 14ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2014-12-27 08:13:29 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (17.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 21.8ms | ActiveRecord: 4.5ms) Started GET "/assets/adherent/cal.gif" for 127.0.0.1 at 2014-12-27 08:13:29 +0100  (1.9ms) SELECT COUNT(*) FROM "adherent_adhesions"  (2.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (5.8ms) select table_name from information_schema.views where table_schema = 'adh_test'  (182.4ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_reglements", "organisms", "adherent_members", "adherent_payments" RESTART IDENTITY CASCADE;  (1.4ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (2.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.8ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/1/payments/new" for 127.0.0.1 at 2014-12-27 08:13:30 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.3ms | ActiveRecord: 3.8ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 2]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 2]]  (0.7ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 2], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/2/payments/new" for 127.0.0.1 at 2014-12-27 08:13:30 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"2"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 2]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.9ms | ActiveRecord: 2.7ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.6ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 3]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 3]]  (0.6ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 3], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/3/payments/new" for 127.0.0.1 at 2014-12-27 08:13:30 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"3"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 3]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 14.6ms | ActiveRecord: 4.2ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 4]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 4], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/4/payments/new" for 127.0.0.1 at 2014-12-27 08:13:30 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 4]] Adherent::Adhesion Load (2.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 93ms (Views: 81.4ms | ActiveRecord: 5.4ms)  (1.1ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 4]] Started POST "/adherent/members/4/payments" for 127.0.0.1 at 2014-12-27 08:13:30 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"4"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Completed 500 Internal Server Error in 4ms SQL (0.6ms) DELETE FROM "adherent_members"  (0.9ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (2.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 5], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 5]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 5], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 5]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 5], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/5/payments" for 127.0.0.1 at 2014-12-27 08:13:30 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"5"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Payment Load (3.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 5]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (24.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 20.8ms | ActiveRecord: 6.4ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.5ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 6], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 6]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 6]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 6], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 6]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 6]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 6], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 6]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/6/payments" for 127.0.0.1 at 2014-12-27 08:13:30 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"6"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "6"]] Adherent::Payment Load (1.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 6]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 6]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.6ms | ActiveRecord: 5.7ms) Started GET "/adherent/payments/2/reglements/new" for 127.0.0.1 at 2014-12-27 08:13:30 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"2"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 6]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (15.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 17.9ms | ActiveRecord: 4.5ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 7], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 7]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 7]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 7], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 7]] SQL (1.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 7], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/7/payments/3" for 127.0.0.1 at 2014-12-27 08:13:30 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"7", "id"=>"3"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 3 LIMIT 1 [["member_id", 7]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (15.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.0ms | ActiveRecord: 6.4ms) SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.7ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 8], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 8]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 8]]  (0.9ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 8], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 8]] SQL (1.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 8], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/8/payments/4" for 127.0.0.1 at 2014-12-27 08:13:30 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"8", "id"=>"4"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 4 LIMIT 1 [["member_id", 8]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 13.8ms | ActiveRecord: 6.8ms) SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 9], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 9]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 9]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 9], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 9]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 9]] SQL (1.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 9], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:13:30 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 9]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/9/payments/5" for 127.0.0.1 at 2014-12-27 08:13:30 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"9", "id"=>"5"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 5 LIMIT 1 [["member_id", 9]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 9]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.2ms | ActiveRecord: 4.1ms) SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 10], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/10/adhesions/new" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"10"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 10]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.1ms | ActiveRecord: 2.0ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 11], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/11/adhesions/new" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"11"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 11]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.4ms | ActiveRecord: 2.4ms)  (2.4ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]] Started POST "/adherent/members/11/adhesions" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"11"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 11], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/11/adhesions Completed 302 Found in 10ms (ActiveRecord: 2.8ms) Started GET "/adherent/members/11/adhesions" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"11"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Adhesion Exists (1.0ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 11]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 9.1ms | ActiveRecord: 4.5ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]] SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 12], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 12], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/12/adhesions" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"12"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 12]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 12]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.5ms | ActiveRecord: 3.5ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.7ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 13], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 13], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/13/adhesions" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"13"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 13]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 13]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 9.8ms | ActiveRecord: 3.1ms) Started GET "/adherent/members/13/adhesions/12/edit" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"13", "id"=>"12"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 13], ["id", "12"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/edit.html.erb within layouts/adherent/application (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.1ms | ActiveRecord: 1.6ms) SQL (1.0ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 14], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/14/adhesions" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"14"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 14]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 14]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (7.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 8.0ms | ActiveRecord: 3.1ms) Started GET "/adherent/members/14/payments/new" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"14"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.6ms | ActiveRecord: 3.3ms) SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/15/coord/new" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"15"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (19.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (22.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 45ms (Views: 25.7ms | ActiveRecord: 4.5ms) Started POST "/adherent/members/15/coord" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"15"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 15]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 15], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/15/adhesions/new Completed 302 Found in 12ms (ActiveRecord: 4.0ms) Started GET "/adherent/members/15/adhesions/new" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"15"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 15]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.7ms | ActiveRecord: 2.4ms) Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 15]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 16], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/16/coord/new" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"16"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (14.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 17.8ms | ActiveRecord: 3.1ms)  (0.6ms) ROLLBACK  (0.4ms) BEGIN SQL (2.3ms) DELETE FROM "adherent_members" Organism Load (64.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 17], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/17/coord/new" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"17"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (16.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 18.6ms | ActiveRecord: 3.1ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/17/coord" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"17"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 17]]  (0.8ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 17], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/17/adhesions/new Completed 302 Found in 11ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/17/adhesions/new" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"17"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 17]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.3ms | ActiveRecord: 2.3ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.7ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/18/coord/new" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"18"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "18"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 18]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (15.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 17.9ms | ActiveRecord: 1.9ms) Started POST "/adherent/members/18/coord" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"18"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "18"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 18]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 18], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/18/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 3.5ms) Started GET "/adherent/members/18/adhesions/new" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"18"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "18"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 18]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 18]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.5ms | ActiveRecord: 2.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (1.0ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 19]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 19]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 19]]  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 20]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 20]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 21]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 21]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 22]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 22]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 23]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 23]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (31.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 37ms (Views: 28.7ms | ActiveRecord: 6.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (1.1ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (2.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 20]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 24]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 24]]  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 25]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 25]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 26]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 27]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 27]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 28]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 28]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (34.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39ms (Views: 27.8ms | ActiveRecord: 9.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:13:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:13:31 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 21]]  (1.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 29]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 29]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 30]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 30]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 31]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 31]]  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 32]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 32]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 33]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 33]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (37.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 42ms (Views: 31.9ms | ActiveRecord: 8.7ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/29/payments" for 127.0.0.1 at 2014-12-27 08:13:32 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"29"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 29]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (2.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 9ms (Views: 4.4ms | ActiveRecord: 1.7ms)  (0.6ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:13:32 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 22]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 34]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 34]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 35]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 35]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 36]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 36]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 37]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 37]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 38]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (37.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 43ms (Views: 33.9ms | ActiveRecord: 6.5ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/34/adhesions" for 127.0.0.1 at 2014-12-27 08:13:32 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"34"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "34"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 34]] Redirected to http://www.example.com/adherent/members/34/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.1ms) Started GET "/adherent/members/34/adhesions/new" for 127.0.0.1 at 2014-12-27 08:13:32 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"34"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "34"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 34]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.5ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:13:32 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 23]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 39]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 39]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 40]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 40]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 41]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 41]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 42]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 42]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 43]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 43]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (37.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 43ms (Views: 34.9ms | ActiveRecord: 5.9ms) Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/39/edit" for 127.0.0.1 at 2014-12-27 08:13:32 +0100 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"39"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "39"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/edit.html.erb within layouts/adherent/application (16.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 19.6ms | ActiveRecord: 1.3ms)  (0.8ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:13:32 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 24]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 44]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 45]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 45]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 46]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 46]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 47]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 47]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 48]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 48]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (30.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 25.9ms | ActiveRecord: 7.0ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2014-12-27 08:13:32 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/new.html.erb within layouts/adherent/application (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 15.8ms | ActiveRecord: 0.6ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:13:32 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 25]]  (1.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 49]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 49]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 50]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 50]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 51]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 51]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 52]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 52]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 53]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 53]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (32.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 37ms (Views: 27.9ms | ActiveRecord: 7.0ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/49/coord" for 127.0.0.1 at 2014-12-27 08:13:32 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"49"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "49"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 49]] Redirected to http://www.example.com/adherent/members/49/coord/new Completed 302 Found in 5ms (ActiveRecord: 1.5ms) Started GET "/adherent/members/49/coord/new" for 127.0.0.1 at 2014-12-27 08:13:32 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"49"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "49"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 49]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (17.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 20.0ms | ActiveRecord: 1.6ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:13:32 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 26]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 54]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 54]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 55]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 55]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 56]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 56]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 57]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 57]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 58]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 58]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (32.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39ms (Views: 30.0ms | ActiveRecord: 5.8ms) Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["member_id", 54], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 54]] Started GET "/adherent/members/54/coord" for 127.0.0.1 at 2014-12-27 08:13:32 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"54"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "54"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 54]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/show.html.erb within layouts/adherent/application (2.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 6.4ms | ActiveRecord: 1.4ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:13:32 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 27]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 59]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 59]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 60]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 60]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 61]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 61]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 62]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 62]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 63]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 63]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (38.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 44ms (Views: 35.2ms | ActiveRecord: 6.2ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 59]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 59]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 59], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/59/adhesions" for 127.0.0.1 at 2014-12-27 08:13:32 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"59"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "59"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 59]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 59]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 8.9ms | ActiveRecord: 2.8ms)  (0.7ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (1.7ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2014-12-27 08:13:32 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/new.html.erb within layouts/adherent/application (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 13.5ms | ActiveRecord: 0.5ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2014-12-27 08:13:32 +0100 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 07:13:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/69/coord/new Completed 302 Found in 11ms (ActiveRecord: 2.7ms) Started GET "/adherent/members/69/coord/new" for 127.0.0.1 at 2014-12-27 08:13:32 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"69"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "69"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 69]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (14.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (15.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 18.0ms | ActiveRecord: 1.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members"  (0.8ms) ROLLBACK  (0.4ms) BEGIN SQL (1.3ms) DELETE FROM "adherent_members" Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (5.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 70]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 70]]  (0.5ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 70], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/70/payments/new" for 127.0.0.1 at 2014-12-27 08:13:51 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"70"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]] Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Adhesion Load (2.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 70]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (81.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (90.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 199ms (Views: 164.6ms | ActiveRecord: 8.3ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 71]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 71]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 71], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/71/payments/new" for 127.0.0.1 at 2014-12-27 08:13:51 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"71"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 71]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 12.9ms | ActiveRecord: 3.2ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 72]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 72]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 72], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/72/payments/new" for 127.0.0.1 at 2014-12-27 08:13:51 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"72"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "72"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 72]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.8ms | ActiveRecord: 2.5ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 73]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 73]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 73], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/73/payments/new" for 127.0.0.1 at 2014-12-27 08:13:51 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"73"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "73"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 73]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.7ms | ActiveRecord: 2.5ms)  (1.2ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 73]] Started POST "/adherent/members/73/payments" for 127.0.0.1 at 2014-12-27 08:13:51 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"73"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "73"]] Completed 500 Internal Server Error in 4ms SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 74]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 74]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 74], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 74]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 33]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 74], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 74]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/74/payments/6" for 127.0.0.1 at 2014-12-27 08:13:51 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"74", "id"=>"6"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "74"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 6 LIMIT 1 [["member_id", 74]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 74]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (6.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (32.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 41ms (Views: 31.8ms | ActiveRecord: 5.6ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 75]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 75]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 75], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 75]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 34]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 75], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 75]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/75/payments/7" for 127.0.0.1 at 2014-12-27 08:13:51 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"75", "id"=>"7"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "75"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 7 LIMIT 1 [["member_id", 75]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 75]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (16.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.5ms | ActiveRecord: 6.2ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 35], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 76]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 76]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 76], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 76]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 35]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 76], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 76]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/76/payments/8" for 127.0.0.1 at 2014-12-27 08:13:51 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"76", "id"=>"8"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "76"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 8 LIMIT 1 [["member_id", 76]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 76]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (13.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.3ms) Completed 200 OK in 22ms (Views: 13.5ms | ActiveRecord: 4.8ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 36], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 77]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 77]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 77], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 77]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 36]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 77], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:13:51 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 77]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/77/payments" for 127.0.0.1 at 2014-12-27 08:13:51 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"77"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "77"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 77]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 77]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (79.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 86ms (Views: 78.6ms | ActiveRecord: 4.7ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:13:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:13:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 37], ["updated_at", Sat, 27 Dec 2014 07:13:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 78]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 78]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:52 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 78], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:13:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 78]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 37]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:13:52 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 78], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:13:52 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 78]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/78/payments" for 127.0.0.1 at 2014-12-27 08:13:52 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"78"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "78"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 78]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 78]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.7ms | ActiveRecord: 4.4ms) Started GET "/adherent/payments/10/reglements/new" for 127.0.0.1 at 2014-12-27 08:13:52 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"10"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 78]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (10.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 17.7ms | ActiveRecord: 4.1ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (5.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 38], ["updated_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 79]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 79]]  (0.3ms) SAVEPOINT active_record_1 SQL (3.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 79], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 79]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 38]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 79], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 79]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/79/payments" for 127.0.0.1 at 2014-12-27 08:25:10 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"79"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "79"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 79]] Adherent::Reglement Load (1.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 79]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (17.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (31.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 158ms (Views: 148.4ms | ActiveRecord: 5.7ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 39], ["updated_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 80]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 80]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 80], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 80]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 39]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 80], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 80]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/80/payments" for 127.0.0.1 at 2014-12-27 08:25:10 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"80"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "80"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 80]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 80]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.1ms | ActiveRecord: 5.1ms) Started GET "/adherent/payments/12/reglements/new" for 127.0.0.1 at 2014-12-27 08:25:10 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"12"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 80]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (80.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (85.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 104ms (Views: 87.7ms | ActiveRecord: 4.9ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 40], ["updated_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 81]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 81]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 81], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 81]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 40]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 81], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:25:10 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 81]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/81/payments/13" for 127.0.0.1 at 2014-12-27 08:25:10 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"81", "id"=>"13"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "81"]] Adherent::Payment Load (1.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 13 LIMIT 1 [["member_id", 81]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 81]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (7.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (32.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 45ms (Views: 33.6ms | ActiveRecord: 6.0ms) SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (1.1ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 41], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 82]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 82]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 82], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 82]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 41]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 82], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 82]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/82/payments/14" for 127.0.0.1 at 2014-12-27 08:25:11 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"82", "id"=>"14"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "82"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 14 LIMIT 1 [["member_id", 82]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 82]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.6ms | ActiveRecord: 4.7ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 42], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 83]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 83]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 83], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 83]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 42]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 83], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 83]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/83/payments/15" for 127.0.0.1 at 2014-12-27 08:25:11 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"83", "id"=>"15"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "83"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 15 LIMIT 1 [["member_id", 83]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 83]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (12.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.5ms | ActiveRecord: 4.2ms) SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 43], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 84]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 84]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 84], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/84/payments/new" for 127.0.0.1 at 2014-12-27 08:25:11 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"84"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "84"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 43]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 84]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 17.5ms | ActiveRecord: 3.1ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 44], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 85]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 85]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 85], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/85/payments/new" for 127.0.0.1 at 2014-12-27 08:25:11 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"85"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "85"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 44]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 85]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.3ms | ActiveRecord: 1.9ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 45], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 86]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 86]]  (1.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 86], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/86/payments/new" for 127.0.0.1 at 2014-12-27 08:25:11 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"86"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "86"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 45]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 86]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.7ms | ActiveRecord: 2.8ms)  (1.1ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 86]] Started POST "/adherent/members/86/payments" for 127.0.0.1 at 2014-12-27 08:25:11 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"86"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "86"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 86]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 45]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 86], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 86]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/86/payments Completed 302 Found in 15ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/86/payments" for 127.0.0.1 at 2014-12-27 08:25:11 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"86"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "86"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 86]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 86]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.9ms | ActiveRecord: 4.3ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 86]] SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 46], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 87]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 87]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 87], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:25:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/87/payments/new" for 127.0.0.1 at 2014-12-27 08:25:11 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"87"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "87"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 46]] Adherent::Adhesion Load (0.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 87]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.6ms | ActiveRecord: 2.0ms) SQL (0.8ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.4ms) BEGIN SQL (1.6ms) DELETE FROM "adherent_members" Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (5.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 47], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 47], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 47], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 88]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 88]]  (0.5ms) SAVEPOINT active_record_1 SQL (3.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 88], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (1.3ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 88]] Started GET "/adherent/members/88/payments/new" for 127.0.0.1 at 2014-12-27 08:25:59 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"88"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "88"]] Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 47]] Adherent::Adhesion Load (2.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 88]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (80.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (88.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 194ms (Views: 159.8ms | ActiveRecord: 9.3ms) Started POST "/adherent/members/88/payments" for 127.0.0.1 at 2014-12-27 08:25:59 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"88"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "88"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 88]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 47]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 88], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 88]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] SQL (1.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 33], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["payment_id", 17], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/88/payments Completed 302 Found in 34ms (ActiveRecord: 7.8ms) Started GET "/adherent/members/88/payments" for 127.0.0.1 at 2014-12-27 08:25:59 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"88"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "88"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 88]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 88]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 88]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (20.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (32.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39ms (Views: 29.5ms | ActiveRecord: 7.2ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 88]]  (0.9ms) ROLLBACK  (0.3ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 48], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 48], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 48], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 91]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 91]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 91], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/91/payments/new" for 127.0.0.1 at 2014-12-27 08:25:59 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"91"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "91"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 48]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 91]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.1ms | ActiveRecord: 3.5ms) Started POST "/adherent/members/91/payments" for 127.0.0.1 at 2014-12-27 08:25:59 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"91"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "91"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 91]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 48]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 91], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 91]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 34], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["payment_id", 18], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/91/payments Completed 302 Found in 20ms (ActiveRecord: 5.6ms) Started GET "/adherent/members/91/payments" for 127.0.0.1 at 2014-12-27 08:25:59 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"91"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "91"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 91]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 91]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 91]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.5ms | ActiveRecord: 4.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 49], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 49], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 49], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 94]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 94]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 94], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/94/payments/new" for 127.0.0.1 at 2014-12-27 08:25:59 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"94"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "94"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 49]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 94]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 11.3ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/94/payments" for 127.0.0.1 at 2014-12-27 08:25:59 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"94"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "94"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 94]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 49]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 94], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 94]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 35], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/94/payments Completed 302 Found in 18ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/94/payments" for 127.0.0.1 at 2014-12-27 08:25:59 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"94"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "94"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 94]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 94]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 94]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.7ms | ActiveRecord: 5.1ms)  (1.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 94]]  (0.4ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 50], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 50], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 50], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 97]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 97]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 97], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/97/payments/new" for 127.0.0.1 at 2014-12-27 08:25:59 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"97"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "97"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 50]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 97]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 11.6ms | ActiveRecord: 3.7ms) Started POST "/adherent/members/97/payments" for 127.0.0.1 at 2014-12-27 08:25:59 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"97"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "97"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 97]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 50]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 97], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 97]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 36], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00], ["payment_id", 20], ["updated_at", Sat, 27 Dec 2014 07:25:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/97/payments Completed 302 Found in 18ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/97/payments" for 127.0.0.1 at 2014-12-27 08:25:59 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"97"} Organism Load (2.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "97"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 97]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 97]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 97]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 80ms (Views: 16.0ms | ActiveRecord: 7.6ms) Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 97]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 98]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 98]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 98], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 99]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 99]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 99], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/20/reglements/new" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"20"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "20"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 97]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 98]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 99]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (18.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (23.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 36ms (Views: 23.6ms | ActiveRecord: 6.7ms) Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 97]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 97]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 51], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 51], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 51], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 100]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 100]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 100], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/100/payments/new" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"100"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "100"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 51]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 100]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.2ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/100/payments" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"100"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "100"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 100]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 51]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 100], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 100]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 39], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["payment_id", 21], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/100/payments Completed 302 Found in 18ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/100/payments" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"100"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "100"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 100]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 39]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 100]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 100]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (13.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.6ms | ActiveRecord: 4.1ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 100]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 101]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 101]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 101], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 102]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 102]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 102], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/21/reglements/new" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"21"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "21"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 100]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 102]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 41]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 101]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 40]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (16.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.0ms | ActiveRecord: 6.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (2.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 52], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 52], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 52], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 103]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 103]]  (1.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 103], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/103/payments/new" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"103"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "103"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 52]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 103]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 42]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.6ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/103/payments" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"103"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "103"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 103]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 52]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 103], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 103]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 42]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 42], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["payment_id", 22], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/103/payments Completed 302 Found in 18ms (ActiveRecord: 5.7ms) Started GET "/adherent/members/103/payments" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"103"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "103"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 103]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 42]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 103]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 103]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.9ms | ActiveRecord: 4.7ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 103]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 104]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 104]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 104], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 105]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 105]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 105], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/22/reglements/new" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"22"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "22"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 103]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 105]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 44]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 104]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 43]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 15.1ms | ActiveRecord: 5.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 53], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 53], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 53], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 106]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 106]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 106], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/106/payments/new" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"106"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "106"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 53]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 106]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.7ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/106/payments" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"106"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "106"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 106]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 53]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 106], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 106]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 45], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["payment_id", 23], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/106/payments Completed 302 Found in 18ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/106/payments" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"106"} Organism Load (6.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "106"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 106]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 45]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 106]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]]  (1.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 106]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (17.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 15.0ms | ActiveRecord: 12.3ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 106]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 107]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 107]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 107], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 108]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 108]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 108], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/23/reglements/new" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"23"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "23"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 106]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 108]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 47]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 107]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (17.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.1ms | ActiveRecord: 5.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 54], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 54) LIMIT 1  (1.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 54], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 54], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 109]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 109]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 109], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/109/payments/new" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"109"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "109"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 54]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 109]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.8ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/109/payments" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"109"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "109"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 109]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 54]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 109], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 109]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 48], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["payment_id", 24], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/109/payments Completed 302 Found in 18ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/109/payments" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"109"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "109"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 109]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 48]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 109]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 109]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.1ms | ActiveRecord: 4.5ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 109]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 110]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 110]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 110], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 111]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 111]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 111], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/24/reglements/new" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"24"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "24"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 109]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 111]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 50]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 110]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 49]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (17.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.6ms | ActiveRecord: 5.9ms) Started POST "/adherent/payments/24/reglements" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"49"}, "commit"=>"Enregistrer", "payment_id"=>"24"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Unpermitted parameters: adhesion_id Completed 404 Not Found in 2ms  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 55], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 55], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 55], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 112]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 112]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 112], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/112/payments/new" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"112"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "112"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 55]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 112]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 51]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.0ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/112/payments" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"112"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "112"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 112]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 55]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 112], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 112]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 51]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 51], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["payment_id", 25], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/112/payments Completed 302 Found in 19ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/112/payments" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"112"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "112"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 112]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 51]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 112]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 112]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.9ms | ActiveRecord: 4.4ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 112]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 113]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 113]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 113], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 114]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 114]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 114], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/25/reglements/new" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"25"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "25"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 112]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 114]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 53]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 113]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 52]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (20.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 20.2ms | ActiveRecord: 6.3ms) Started POST "/adherent/payments/25/reglements" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"52"}, "commit"=>"Enregistrer", "payment_id"=>"25"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Unpermitted parameters: adhesion_id Completed 404 Not Found in 2ms  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 56], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (3.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 56], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 56], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (2.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 115]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 115]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 115], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/115/payments/new" for 127.0.0.1 at 2014-12-27 08:26:00 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"115"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "115"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 56]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 115]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 54]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 10.8ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/115/payments" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"115"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "115"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 115]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 56]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 115], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 115]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 54]] SQL (2.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 54], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["payment_id", 26], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/115/payments Completed 302 Found in 21ms (ActiveRecord: 6.6ms) Started GET "/adherent/members/115/payments" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"115"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "115"]] Adherent::Payment Load (1.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 115]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 54]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 115]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 115]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.3ms | ActiveRecord: 6.2ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 115]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 116]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 116]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 116], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 117]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 117]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 117], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/26/reglements/new" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"26"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 115]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 56]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 116]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (17.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.9ms | ActiveRecord: 5.5ms) Started POST "/adherent/payments/26/reglements" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"55"}, "commit"=>"Enregistrer", "payment_id"=>"26"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Unpermitted parameters: adhesion_id Completed 404 Not Found in 3ms  (1.0ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 57], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 57], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 57], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 118]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 118]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 118], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/118/payments/new" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"118"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "118"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 57]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 118]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 57]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 11.6ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/118/payments" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"118"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "118"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 118]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 57]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 118], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 118]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 57]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 57], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["payment_id", 27], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/118/payments Completed 302 Found in 21ms (ActiveRecord: 6.4ms) Started GET "/adherent/members/118/payments" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"118"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "118"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 118]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 57]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 118]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 118]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.5ms | ActiveRecord: 4.6ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 118]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 119]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 119]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 119], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 120]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 120]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 120], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/27/reglements/new" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"27"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "27"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 118]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 119]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 58]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (18.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 16.9ms | ActiveRecord: 6.2ms) Started POST "/adherent/payments/27/reglements" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"58"}, "commit"=>"Enregistrer", "payment_id"=>"27"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Unpermitted parameters: adhesion_id Completed 404 Not Found in 3ms  (0.3ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 58], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 58], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 58], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 121]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 121]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 121], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/121/payments/new" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"121"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "121"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 58]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 121]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.0ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/121/payments" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"121"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "121"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 121]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 58]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 121], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 121]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 60], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["payment_id", 28], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/121/payments Completed 302 Found in 18ms (ActiveRecord: 5.6ms) Started GET "/adherent/members/121/payments" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"121"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "121"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 121]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 60]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 121]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 121]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.3ms | ActiveRecord: 4.2ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 121]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 122]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 122]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 122], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 123]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 123]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 123], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/28/reglements/new" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"28"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "28"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 121]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 122]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 61]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (17.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 15.8ms | ActiveRecord: 6.6ms) Started POST "/adherent/payments/28/reglements" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"61"}, "commit"=>"Enregistrer", "payment_id"=>"28"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Unpermitted parameters: adhesion_id Completed 404 Not Found in 2ms  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 59], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 59], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 59], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 124]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 124]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 124], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/124/payments/new" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"124"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "124"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 59]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 124]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 63]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (68.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (69.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 80ms (Views: 71.8ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/124/payments" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"124"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "124"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 124]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 59]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 124], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 124]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 63]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 63], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["payment_id", 29], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/124/payments Completed 302 Found in 18ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/124/payments" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"124"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "124"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 124]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 63]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 124]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 124]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.4ms | ActiveRecord: 4.8ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 124]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]]  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 60], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 60], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 60], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 127]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 127]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 127], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/127/payments/new" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"127"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "127"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 60]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 127]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 64]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 11.7ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/127/payments" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"127"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "127"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 60]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 127], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 127]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 64]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 64], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["payment_id", 30], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/127/payments Completed 302 Found in 18ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/127/payments" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"127"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "127"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 127]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 64]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.1ms | ActiveRecord: 4.5ms)  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 127]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 61], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 61], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 61], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 130]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 130]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 130], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/130/payments/new" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"130"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "130"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 61]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 130]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 10.9ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/130/payments" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"130"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "130"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 61]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 130], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 130]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 65], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["payment_id", 31], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/130/payments Completed 302 Found in 18ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/130/payments" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"130"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "130"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 130]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 65]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (13.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.3ms | ActiveRecord: 4.8ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 130]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 62], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 62], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 62], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 133]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 133]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 133], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/133/payments/new" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"133"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "133"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 62]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 133]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 66]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.1ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/133/payments" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"133"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "133"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 62]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 133], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 133]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 66]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 66], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00], ["payment_id", 32], ["updated_at", Sat, 27 Dec 2014 07:26:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/133/payments Completed 302 Found in 19ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/133/payments" for 127.0.0.1 at 2014-12-27 08:26:01 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"133"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "133"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 133]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 66]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.1ms | ActiveRecord: 4.4ms)  (1.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 133]]  (0.4ms) ROLLBACK  (0.4ms) BEGIN SQL (0.9ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (4.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 63], ["updated_at", Sat, 27 Dec 2014 07:30:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 63], ["updated_at", Sat, 27 Dec 2014 07:30:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 63], ["updated_at", Sat, 27 Dec 2014 07:30:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 136]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 136]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:10 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 136], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/136/payments/new" for 127.0.0.1 at 2014-12-27 08:30:10 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"136"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "136"]] Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 63]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 136]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 67]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (81.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (90.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.1ms) Completed 200 OK in 203ms (Views: 160.7ms | ActiveRecord: 11.2ms) Started POST "/adherent/members/136/payments" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"136"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "136"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 136]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 63]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 136], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 136]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 67]] SQL (1.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 67], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["payment_id", 33], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/136/payments Completed 302 Found in 33ms (ActiveRecord: 7.5ms) Started GET "/adherent/members/136/payments" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"136"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "136"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 136]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 67]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 136]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 136]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (22.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (33.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40ms (Views: 30.2ms | ActiveRecord: 7.5ms)  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 136]]  (0.6ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 64], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 64], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 64], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 139]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 139]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 139], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/139/payments/new" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"139"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "139"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 64]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 139]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 68]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.3ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/139/payments" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"139"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "139"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 139]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 64]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 139], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 139]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 68]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 68], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["payment_id", 34], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/139/payments Completed 302 Found in 20ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/139/payments" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"139"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "139"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 139]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 68]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 139]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 139]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.0ms | ActiveRecord: 5.3ms) Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 139]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 65], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 65], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 65], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 142]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 142]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 142], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/142/payments/new" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"142"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "142"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 65]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 142]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 69]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.2ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/142/payments" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"142"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "142"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 65]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 142], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 142]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 69]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 69], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["payment_id", 35], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/142/payments Completed 302 Found in 19ms (ActiveRecord: 6.0ms) Started GET "/adherent/members/142/payments" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"142"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "142"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 142]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 69]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.0ms | ActiveRecord: 4.5ms)  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 142]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 66], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 66], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 66], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 145]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 145]]  (0.5ms) SAVEPOINT active_record_1 SQL (4.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 145], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/145/payments/new" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"145"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "145"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 66]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 145]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 70]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.6ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/145/payments" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"145"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "145"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 145]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 66]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 145], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 145]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 70]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 70], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["payment_id", 36], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/145/payments Completed 302 Found in 19ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/145/payments" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"145"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "145"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 145]] Adherent::Reglement Load (54.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 70]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 145]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 145]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (68.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (71.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 76ms (Views: 14.9ms | ActiveRecord: 59.5ms) Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 145]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 70]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 67], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 67], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 67], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 148]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 148]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 148], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/148/payments/new" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"148"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "148"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 67]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 148]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.7ms) Completed 200 OK in 21ms (Views: 11.7ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/148/payments" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"148"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "148"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (1.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 148]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 67]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 148], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 148]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 71], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["payment_id", 37], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/148/payments Completed 302 Found in 19ms (ActiveRecord: 6.6ms) Started GET "/adherent/members/148/payments" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"148"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "148"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 148]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 71]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 148]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 148]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.3ms | ActiveRecord: 6.0ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 68], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 68], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 68], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 151]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 151]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 151], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/151/payments/new" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"151"} Organism Load (2.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "151"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 68]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 151]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 72]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 11.8ms | ActiveRecord: 4.2ms) Started POST "/adherent/members/151/payments" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"151"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "151"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 151]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 68]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 151], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 151]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 72]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 72], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["payment_id", 38], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/151/payments Completed 302 Found in 19ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/151/payments" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"151"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "151"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 151]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 72]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 151]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 151]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.5ms | ActiveRecord: 4.4ms)  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 151]]  (0.4ms) ROLLBACK  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 69], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 69], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 69], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 154]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 154]]  (4.0ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 154], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 154]] Started GET "/adherent/members/154/payments/new" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"154"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "154"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 69]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 154]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 73]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 10.5ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/154/payments" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"154"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "154"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 69]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 154], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 154]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 73]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 73], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["payment_id", 39], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/154/payments Completed 302 Found in 18ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/154/payments" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"154"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "154"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 154]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 73]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.9ms | ActiveRecord: 4.6ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 154]]  (0.5ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (1.9ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 70], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 70], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 70], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 157]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 157]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 157], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/157/payments/new" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"157"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "157"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 70]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 157]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 74]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.4ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/157/payments" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"157"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "157"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 70]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 157], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 157]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 74]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 74], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["payment_id", 40], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/157/payments Completed 302 Found in 19ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/157/payments" for 127.0.0.1 at 2014-12-27 08:30:11 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"157"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "157"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 157]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 74]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.9ms | ActiveRecord: 4.4ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 157]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 158]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 158]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 158], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 159]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 159]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 159], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/40/reglements/new" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"40"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "40"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 76]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 158]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 75]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (19.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (24.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 36ms (Views: 24.7ms | ActiveRecord: 6.4ms)  (0.6ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 71], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 71], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 71], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 160]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 160]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 160], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/160/payments/new" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"160"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "160"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 71]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 160]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 77]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.2ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/160/payments" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"160"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "160"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 160]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 71]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 160], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 160]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 77]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 77], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["payment_id", 41], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/160/payments Completed 302 Found in 20ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/160/payments" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"160"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "160"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 160]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 77]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 160]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 160]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.0ms | ActiveRecord: 4.4ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 160]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 161]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 161]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 161], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 162]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 162]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 162], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/41/reglements/new" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"41"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 160]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 162]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 79]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 161]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 78]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (16.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.3ms | ActiveRecord: 5.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 72) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 72) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 72], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 72) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 72) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 72], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 72) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 72) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 72], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 163]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 163]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 163], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/163/payments/new" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"163"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "163"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 72]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 163]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 80]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.6ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/163/payments" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"163"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "163"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 163]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 72]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 163], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 163]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 80]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 80], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["payment_id", 42], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/163/payments Completed 302 Found in 18ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/163/payments" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"163"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "163"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 163]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 80]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 163]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 163]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 20ms (Views: 14.1ms | ActiveRecord: 4.4ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 163]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 164]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 164]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 164], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 165]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 165]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 165], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/42/reglements/new" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"42"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "42"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 163]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 165]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 82]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 164]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 81]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (17.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.1ms | ActiveRecord: 5.6ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 163]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 163]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 73) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 73) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 73], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 73) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 73) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 73], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 73) LIMIT 1  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 73) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 73], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 166]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 166]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 166], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/166/payments/new" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"166"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "166"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 73]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 166]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 83]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.6ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/166/payments" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"166"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "166"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 166]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 73]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 166], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 166]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 83]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 83], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["payment_id", 43], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/166/payments Completed 302 Found in 19ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/166/payments" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"166"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "166"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 166]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 83]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 166]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 166]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.7ms | ActiveRecord: 4.5ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 166]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 167]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 167]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 167], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 168]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 168]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 168], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/43/reglements/new" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"43"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "43"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 166]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] Adherent::Adhesion Load (5.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 167]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 84]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 168]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 85]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (75.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (77.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 87ms (Views: 71.1ms | ActiveRecord: 11.3ms)  (0.5ms) ROLLBACK  (0.6ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 74) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 74) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 74], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 74) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 74) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 74], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 74) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 74) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 74], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 169]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 169]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 169], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/169/payments/new" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"169"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "169"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 74]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 169]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 86]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.6ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/169/payments" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"169"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "169"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 74]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 169], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 169]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 86]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 86], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["payment_id", 44], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/169/payments Completed 302 Found in 18ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/169/payments" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"169"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "169"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 169]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 86]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 13.9ms | ActiveRecord: 4.1ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 169]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 170]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 170]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 170], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 171]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 171]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 171], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/44/reglements/new" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"44"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "44"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 170]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 87]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 171]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 88]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (16.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 15.9ms | ActiveRecord: 5.5ms) Started POST "/adherent/payments/44/reglements" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"87"}, "commit"=>"Enregistrer", "payment_id"=>"44"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "44"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "87"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 87]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 87], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["payment_id", 44], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]] Redirected to http://www.example.com/adherent/members/169/payments Completed 302 Found in 13ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/169/payments" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"169"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "169"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 169]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 86]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 87]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 170]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.6ms | ActiveRecord: 5.3ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 75) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 75) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 75], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 75) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 75) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 75], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 75) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 75) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 75], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 172]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 172]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 172], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/172/payments/new" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"172"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "172"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 75]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 172]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 89]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.7ms | ActiveRecord: 3.6ms) Started POST "/adherent/members/172/payments" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"172"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "172"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 75]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 172], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 172]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 89]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 89], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["payment_id", 45], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/172/payments Completed 302 Found in 19ms (ActiveRecord: 6.0ms) Started GET "/adherent/members/172/payments" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"172"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "172"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 172]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 89]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.1ms | ActiveRecord: 4.3ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 172]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 173]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 173]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 173], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 174]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 174]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 174], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/45/reglements/new" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"45"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "45"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Adherent::Reglement Load (1.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 173]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 90]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 174]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 91]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (16.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 15.1ms | ActiveRecord: 6.5ms) Started POST "/adherent/payments/45/reglements" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"90"}, "commit"=>"Enregistrer", "payment_id"=>"45"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "45"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "90"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 90]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 90], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00], ["payment_id", 45], ["updated_at", Sat, 27 Dec 2014 07:30:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Redirected to http://www.example.com/adherent/members/172/payments Completed 302 Found in 12ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/172/payments" for 127.0.0.1 at 2014-12-27 08:30:12 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"172"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "172"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 172]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 89]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 90]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 173]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (17.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.4ms | ActiveRecord: 5.6ms) Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 90]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 173]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 76) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 76) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 76], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 76) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 76) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 76], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 76) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 76) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 76], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 175]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 175]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 175], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/175/payments/new" for 127.0.0.1 at 2014-12-27 08:30:13 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"175"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "175"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 76]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 175]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 92]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 10.8ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/175/payments" for 127.0.0.1 at 2014-12-27 08:30:13 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"175"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "175"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 76]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 175], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 175]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 92]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 92], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["payment_id", 46], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/175/payments Completed 302 Found in 19ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/175/payments" for 127.0.0.1 at 2014-12-27 08:30:13 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"175"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "175"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 175]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 92]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.3ms | ActiveRecord: 4.6ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 175]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 176]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 176]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 176], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 177]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 177]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 177], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/46/reglements/new" for 127.0.0.1 at 2014-12-27 08:30:13 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"46"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "46"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 177]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 94]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 176]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 93]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (17.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 15.9ms | ActiveRecord: 6.0ms) Started POST "/adherent/payments/46/reglements" for 127.0.0.1 at 2014-12-27 08:30:13 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"93"}, "commit"=>"Enregistrer", "payment_id"=>"46"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "46"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "93"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 93]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 93], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["payment_id", 46], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Redirected to http://www.example.com/adherent/members/175/payments Completed 302 Found in 15ms (ActiveRecord: 5.9ms) Started GET "/adherent/members/175/payments" for 127.0.0.1 at 2014-12-27 08:30:13 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"175"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "175"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 175]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 92]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 93]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 176]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 16.0ms | ActiveRecord: 5.4ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 92]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]]  (0.4ms) ROLLBACK  (0.4ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 77) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 77) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 77], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 77) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 77) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 77], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 77) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 77) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 77], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 178]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 178]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 178], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/178/payments/new" for 127.0.0.1 at 2014-12-27 08:30:13 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"178"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "178"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 77]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 178]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 95]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 11.5ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/178/payments" for 127.0.0.1 at 2014-12-27 08:30:13 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"178"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "178"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 77]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 178], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 178]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 95]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 95], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["payment_id", 47], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/178/payments Completed 302 Found in 18ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/178/payments" for 127.0.0.1 at 2014-12-27 08:30:13 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"178"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "178"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 178]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 95]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.8ms | ActiveRecord: 4.2ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 178]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 179]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 179]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 179], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 180]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 180]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 180], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/47/reglements/new" for 127.0.0.1 at 2014-12-27 08:30:13 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"47"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "47"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 180]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 97]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 179]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 96]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (16.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 15.4ms | ActiveRecord: 5.6ms) Started POST "/adherent/payments/47/reglements" for 127.0.0.1 at 2014-12-27 08:30:13 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"96"}, "commit"=>"Enregistrer", "payment_id"=>"47"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "47"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "96"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 96]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 96], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["payment_id", 47], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Redirected to http://www.example.com/adherent/members/178/payments Completed 302 Found in 13ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/178/payments" for 127.0.0.1 at 2014-12-27 08:30:13 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"178"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "178"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 178]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 95]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 96]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 179]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.6ms | ActiveRecord: 5.6ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 179]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 96]]  (0.2ms) ROLLBACK  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 78) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 78) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 78], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 78) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 78) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 78], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 78) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 78) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 78], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 181]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 181]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 181], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/181/payments/new" for 127.0.0.1 at 2014-12-27 08:30:13 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"181"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "181"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 78]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 181]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 98]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.3ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/181/payments" for 127.0.0.1 at 2014-12-27 08:30:13 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"181"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "181"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 78]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 181], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 181]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 98]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 98], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["payment_id", 48], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/181/payments Completed 302 Found in 18ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/181/payments" for 127.0.0.1 at 2014-12-27 08:30:13 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"181"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "181"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 181]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 98]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.7ms | ActiveRecord: 4.3ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 181]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 182]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 182]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 182], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 183]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 183]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 183], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/48/reglements/new" for 127.0.0.1 at 2014-12-27 08:30:13 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"48"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "48"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 182]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 99]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 183]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 100]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (16.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.2ms | ActiveRecord: 5.9ms) Started POST "/adherent/payments/48/reglements" for 127.0.0.1 at 2014-12-27 08:30:13 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"99"}, "commit"=>"Enregistrer", "payment_id"=>"48"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "48"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "99"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 99]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 99], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00], ["payment_id", 48], ["updated_at", Sat, 27 Dec 2014 07:30:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Redirected to http://www.example.com/adherent/members/181/payments Completed 302 Found in 15ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/181/payments" for 127.0.0.1 at 2014-12-27 08:30:13 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"181"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "181"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 181]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 98]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 99]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 182]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (19.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 17.0ms | ActiveRecord: 6.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.9ms) DELETE FROM "adherent_members" Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (4.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 79) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 79) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 79], ["updated_at", Sat, 27 Dec 2014 07:30:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 79) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 79) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 79], ["updated_at", Sat, 27 Dec 2014 07:30:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 79) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 79) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 79], ["updated_at", Sat, 27 Dec 2014 07:30:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 79) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 79) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 79], ["updated_at", Sat, 27 Dec 2014 07:30:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 79) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 79) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 79], ["updated_at", Sat, 27 Dec 2014 07:30:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:30:22 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 79]]  (2.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 184]] Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 184]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 185]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 185]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 186]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 186]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 187]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 187]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 188]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 188]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (131.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 223ms (Views: 192.1ms | ActiveRecord: 14.8ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.5ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 80) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 80) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 80], ["updated_at", Sat, 27 Dec 2014 07:30:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (52.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 80) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 80) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 80], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 80) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 80) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 80], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 80) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 80) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 80], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 80) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 80) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 80], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:30:23 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 80]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 189]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 189]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 190]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 190]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 191]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 191]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 192]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 192]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 193]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 193]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (30.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 26.6ms | ActiveRecord: 6.3ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 81) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 81], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 81) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 81], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 81) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 81], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 81) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 81], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 81) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 81], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2014-12-27 08:30:23 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (29.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/new.html.erb within layouts/adherent/application (33.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39ms (Views: 35.9ms | ActiveRecord: 0.6ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2014-12-27 08:30:23 +0100 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 81], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/199/coord/new Completed 302 Found in 11ms (ActiveRecord: 2.6ms) Started GET "/adherent/members/199/coord/new" for 127.0.0.1 at 2014-12-27 08:30:23 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"199"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "199"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 199]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (20.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 42ms (Views: 24.0ms | ActiveRecord: 3.6ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_members"  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 82) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 82) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 82], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 82) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 82) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 82], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 82) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 82) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 82], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 82) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 82) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 82], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 82) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 82) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 82], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:30:23 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 82]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 200]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 200]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 201]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 201]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 202]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 202]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 203]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 203]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 204]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 204]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (35.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40ms (Views: 32.3ms | ActiveRecord: 6.5ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 200]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 200]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 200], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/200/adhesions" for 127.0.0.1 at 2014-12-27 08:30:23 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"200"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "200"]] Adherent::Adhesion Exists (1.2ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 200]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 200]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 101]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 101]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (20.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 19.2ms | ActiveRecord: 6.5ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 83) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 83) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 83], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 83) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 83) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 83], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 83) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 83) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 83], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 83) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 83) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 83], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 83) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 83) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 83], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:30:23 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 83]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 205]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 205]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 206]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 206]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 207]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 207]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 208]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 208]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 209]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 209]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (36.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 41ms (Views: 33.4ms | ActiveRecord: 6.0ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["member_id", 205], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 205]] Started GET "/adherent/members/205/coord" for 127.0.0.1 at 2014-12-27 08:30:23 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"205"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "205"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 205]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/show.html.erb within layouts/adherent/application (3.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 12ms (Views: 6.7ms | ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 84) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 84) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 84], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 84) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 84) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 84], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 84) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 84) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 84], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 84) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 84) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 84], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 84) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 84) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 84], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:30:23 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 84]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 210]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 210]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 211]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 211]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 212]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 212]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 213]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 213]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 214]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 214]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (29.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 26.6ms | ActiveRecord: 6.0ms) Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/210/adhesions" for 127.0.0.1 at 2014-12-27 08:30:23 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"210"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "210"]] Adherent::Adhesion Exists (0.3ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 210]] Redirected to http://www.example.com/adherent/members/210/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.2ms) Started GET "/adherent/members/210/adhesions/new" for 127.0.0.1 at 2014-12-27 08:30:23 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"210"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "210"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 210]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 210]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.9ms | ActiveRecord: 2.3ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 85) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 85) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 85], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 85) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 85) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 85], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 85) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 85) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 85], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 85) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 85) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 85], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 85) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 85) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 85], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:30:23 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 85]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 215]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 215]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 216]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 216]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 217]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 217]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 218]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 218]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 219]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 219]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (89.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 93ms (Views: 85.7ms | ActiveRecord: 6.2ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/215/payments" for 127.0.0.1 at 2014-12-27 08:30:23 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"215"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "215"]] Adherent::Payment Load (1.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 215]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 11.0ms | ActiveRecord: 4.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 86) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 86) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 86], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 86) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 86) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 86], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 86) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 86) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 86], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 86) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 86) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 86], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 86) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 86) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 86], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:30:23 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 86]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 220]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 220]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 221]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 221]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 222]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 222]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 223]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 223]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 224]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 224]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (30.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 36ms (Views: 27.3ms | ActiveRecord: 6.2ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/220/coord" for 127.0.0.1 at 2014-12-27 08:30:23 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"220"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "220"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 220]] Redirected to http://www.example.com/adherent/members/220/coord/new Completed 302 Found in 5ms (ActiveRecord: 1.2ms) Started GET "/adherent/members/220/coord/new" for 127.0.0.1 at 2014-12-27 08:30:23 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"220"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "220"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 220]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (17.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 19.7ms | ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.6ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 87) LIMIT 1  (1.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 87], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 87) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 87], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 87) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 87], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 87) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 87], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 87) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 87], ["updated_at", Sat, 27 Dec 2014 07:30:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:30:23 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 87]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 225]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 225]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 226]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 226]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 227]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 227]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 228]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 228]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 229]] Adherent::Coord Load (2.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 229]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (36.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 41ms (Views: 31.9ms | ActiveRecord: 7.5ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/225/edit" for 127.0.0.1 at 2014-12-27 08:30:24 +0100 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"225"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "225"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/edit.html.erb within layouts/adherent/application (14.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 17.2ms | ActiveRecord: 1.3ms)  (0.4ms) ROLLBACK  (0.7ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 88) LIMIT 1  (1.0ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 88], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 88], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 88], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 88], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 88], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:30:24 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 88]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 230]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 230]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 231]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 231]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 232]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 232]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 233]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 233]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 234]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 234]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (30.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 27.1ms | ActiveRecord: 5.7ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2014-12-27 08:30:24 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/new.html.erb within layouts/adherent/application (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 12.8ms | ActiveRecord: 0.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 89) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 89) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 89], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/235/coord/new" for 127.0.0.1 at 2014-12-27 08:30:24 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"235"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "235"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 235]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (16.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 19.2ms | ActiveRecord: 1.8ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 90) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 90) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 90], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/236/coord/new" for 127.0.0.1 at 2014-12-27 08:30:24 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"236"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "236"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 236]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (16.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 18.5ms | ActiveRecord: 1.9ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/236/coord" for 127.0.0.1 at 2014-12-27 08:30:24 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"236"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "236"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 236]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 236], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["zip", ""]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/236/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 3.3ms) Started GET "/adherent/members/236/adhesions/new" for 127.0.0.1 at 2014-12-27 08:30:24 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"236"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "236"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 236]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 236]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (6.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.5ms | ActiveRecord: 2.0ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 91) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 91) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 91], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/237/coord/new" for 127.0.0.1 at 2014-12-27 08:30:24 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"237"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "237"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 237]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 18.4ms | ActiveRecord: 1.6ms) Started POST "/adherent/members/237/coord" for 127.0.0.1 at 2014-12-27 08:30:24 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"237"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "237"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 237]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 237], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/237/adhesions/new Completed 302 Found in 11ms (ActiveRecord: 3.5ms) Started GET "/adherent/members/237/adhesions/new" for 127.0.0.1 at 2014-12-27 08:30:24 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"237"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "237"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 237]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 237]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.2ms | ActiveRecord: 2.4ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 92) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 92) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 92], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/238/coord/new" for 127.0.0.1 at 2014-12-27 08:30:24 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"238"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "238"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 238]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (14.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (15.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 17.7ms | ActiveRecord: 1.5ms) Started POST "/adherent/members/238/coord" for 127.0.0.1 at 2014-12-27 08:30:24 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"238"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "238"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 238]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 238], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/238/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 3.1ms) Started GET "/adherent/members/238/adhesions/new" for 127.0.0.1 at 2014-12-27 08:30:24 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"238"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "238"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 238]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 238]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.5ms | ActiveRecord: 2.1ms) Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 238]]  (53.0ms) ROLLBACK SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (7.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 93], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 93], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 93], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 93], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 93], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 239]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 239]]  (0.5ms) BEGIN SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 239], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:24 UTC +00:00]]  (1.2ms) COMMIT Started GET "/adherent/members/239/adhesions" for 127.0.0.1 at 2014-12-27 08:30:28 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"239"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "239"]] Adherent::Adhesion Exists (1.1ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 239]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 239]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 102]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 102]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (14.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 15.4ms | ActiveRecord: 12.9ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2014-12-27 08:30:29 +0100 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2014-12-27 08:30:29 +0100 Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2014-12-27 08:30:29 +0100 Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2014-12-27 08:30:29 +0100 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2014-12-27 08:30:29 +0100 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2014-12-27 08:30:29 +0100 Started DELETE "/adherent/members/239/adhesions/102" for 127.0.0.1 at 2014-12-27 08:30:29 +0100 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"239", "id"=>"102"} Organism Load (2.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "239"]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 239], ["id", "102"]]  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 102]]  (168.9ms) COMMIT Redirected to http://127.0.0.1:56603/adherent/members/239/adhesions Completed 302 Found in 189ms (ActiveRecord: 175.3ms) Started GET "/adherent/members/239/adhesions" for 127.0.0.1 at 2014-12-27 08:30:29 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"239"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "239"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 239]] Redirected to http://127.0.0.1:56603/adherent/members/239/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 2.2ms) Started GET "/adherent/members/239/adhesions/new" for 127.0.0.1 at 2014-12-27 08:30:29 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"239"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "239"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 239]] Adherent::Adhesion Load (1.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 239]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.3ms | ActiveRecord: 3.3ms) Started GET "/assets/adherent/cal.gif" for 127.0.0.1 at 2014-12-27 08:30:30 +0100  (2.3ms) SELECT COUNT(*) FROM "adherent_adhesions"  (4.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (6.9ms) select table_name from information_schema.views where table_schema = 'adh_test'  (206.1ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "organisms", "adherent_members", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (1.3ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (2.1ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (2.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:31 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:30:31 UTC +00:00]]  (2.1ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:30:31 UTC +00:00]]  (4.1ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:30:31 UTC +00:00]]  (2.9ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:30:31 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:30:31 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:30:31 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (1.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (42.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 48ms (Views: 38.6ms | ActiveRecord: 7.3ms) Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2014-12-27 08:30:31 +0100 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2014-12-27 08:30:31 +0100 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2014-12-27 08:30:31 +0100 Started GET "/assets/images/sort_asc.png" for 127.0.0.1 at 2014-12-27 08:30:31 +0100 Started GET "/assets/images/sort_both.png" for 127.0.0.1 at 2014-12-27 08:30:31 +0100 Started GET "/assets/images/forward_disabled.png" for 127.0.0.1 at 2014-12-27 08:30:31 +0100 Started GET "/assets/images/back_disabled.png" for 127.0.0.1 at 2014-12-27 08:30:31 +0100 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2014-12-27 08:30:31 +0100 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (2.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.3ms) BEGIN Adherent::Coord Load (2.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] SQL (1.1ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (143.7ms) COMMIT Redirected to http://127.0.0.1:56603/adherent/members Completed 302 Found in 160ms (ActiveRecord: 151.0ms) Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:30:32 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (2.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (36.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 55ms (Views: 26.7ms | ActiveRecord: 23.7ms)  (1.2ms) SELECT COUNT(*) FROM "adherent_members"  (1.1ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (4.3ms) select table_name from information_schema.views where table_schema = 'adh_test'  (163.1ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (2.0ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (1.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:33 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:33 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:30:33 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (2.1ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:30:33 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:30:33 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:30:33 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:30:33 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (1.8ms) BEGIN Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (2.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:33 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Sat, 27 Dec 2014 07:30:33 UTC +00:00]] Adherent::Adhesion Load (2.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (1.9ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2014-12-27 08:30:33 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 1]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (32.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 52ms (Views: 29.8ms | ActiveRecord: 16.8ms) Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2014-12-27 08:30:33 +0100 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2014-12-27 08:30:33 +0100 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2014-12-27 08:30:33 +0100 Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2014-12-27 08:30:33 +0100 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (2.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (2.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (1.0ms) BEGIN Adherent::Reglement Load (2.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] SQL (3.6ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (139.4ms) COMMIT Redirected to http://127.0.0.1:56603/adherent/members/1/payments Completed 302 Found in 164ms (ActiveRecord: 151.2ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2014-12-27 08:30:33 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (5.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.3ms) Completed 200 OK in 17ms (Views: 8.6ms | ActiveRecord: 3.9ms)  (3.0ms) SELECT COUNT(*) FROM "adherent_payments"  (2.1ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (4.2ms) select table_name from information_schema.views where table_schema = 'adh_test'  (135.3ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "adherent_reglements", "organisms", "adherent_members", "adherent_payments" RESTART IDENTITY CASCADE;  (0.6ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/1/payments/new" for 127.0.0.1 at 2014-12-27 08:30:35 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 19.6ms | ActiveRecord: 3.9ms)  (1.1ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Started POST "/adherent/members/1/payments" for 127.0.0.1 at 2014-12-27 08:30:35 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 1], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/1/payments Completed 302 Found in 15ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2014-12-27 08:30:35 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Adherent::Reglement Load (1.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (1.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (19.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (24.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.3ms) Completed 200 OK in 32ms (Views: 21.8ms | ActiveRecord: 7.6ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] SQL (0.6ms) DELETE FROM "adherent_members"  (0.9ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 2]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 2]]  (0.5ms) SAVEPOINT active_record_1 SQL (2.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 2], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/2/payments/new" for 127.0.0.1 at 2014-12-27 08:30:35 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"2"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 2]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 11.4ms | ActiveRecord: 5.4ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 3]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 3]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 3], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 3]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 3]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 3], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]] Adherent::Adhesion Load (2.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/3/payments" for 127.0.0.1 at 2014-12-27 08:30:35 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"3"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 3]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.3ms | ActiveRecord: 4.9ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 4]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 4], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 4]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 4]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 4], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/4/payments" for 127.0.0.1 at 2014-12-27 08:30:35 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"4"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 4]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (13.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.5ms | ActiveRecord: 4.8ms) Started GET "/adherent/payments/3/reglements/new" for 127.0.0.1 at 2014-12-27 08:30:35 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"3"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 4]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (11.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (17.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 18.8ms | ActiveRecord: 4.7ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (2.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 5], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 5]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 5], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 5]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 5], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/5/payments/4" for 127.0.0.1 at 2014-12-27 08:30:35 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"5", "id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Payment Load (1.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 4 LIMIT 1 [["member_id", 5]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.6ms | ActiveRecord: 5.9ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (1.4ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (2.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 6], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 6]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 6]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 6], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 6]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 6]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 6], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 6]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/6/payments/5" for 127.0.0.1 at 2014-12-27 08:30:35 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"6", "id"=>"5"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "6"]] Adherent::Payment Load (1.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 5 LIMIT 1 [["member_id", 6]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 6]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.3ms | ActiveRecord: 5.8ms) SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 7], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 7]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 7]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 7], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 7]] SQL (1.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 7], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/7/payments/6" for 127.0.0.1 at 2014-12-27 08:30:35 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"7", "id"=>"6"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 6 LIMIT 1 [["member_id", 7]] Adherent::Reglement Load (1.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (15.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 14.7ms | ActiveRecord: 6.2ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 8], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 8]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 8]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 8], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/8/payments/new" for 127.0.0.1 at 2014-12-27 08:30:35 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"8"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 8]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.3ms | ActiveRecord: 2.5ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 9], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 9]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 9]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 9], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/9/payments/new" for 127.0.0.1 at 2014-12-27 08:30:35 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"9"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "9"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 9]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 9]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.4ms | ActiveRecord: 2.4ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 10], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 10], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/10/adhesions" for 127.0.0.1 at 2014-12-27 08:30:35 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"10"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 10]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 10]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 9.5ms | ActiveRecord: 3.4ms) SQL (0.3ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 11], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 11], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/11/adhesions" for 127.0.0.1 at 2014-12-27 08:30:35 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"11"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 11]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] CACHE (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 8.4ms | ActiveRecord: 4.4ms) Started GET "/adherent/members/11/payments/new" for 127.0.0.1 at 2014-12-27 08:30:35 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"11"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 11]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.1ms | ActiveRecord: 3.1ms) SQL (0.3ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 12], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 12], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/12/adhesions" for 127.0.0.1 at 2014-12-27 08:30:35 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"12"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 12]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 12]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 8.7ms | ActiveRecord: 3.3ms) Started GET "/adherent/members/12/adhesions/12/edit" for 127.0.0.1 at 2014-12-27 08:30:35 +0100 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"12", "id"=>"12"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 12], ["id", "12"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/edit.html.erb within layouts/adherent/application (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 13.5ms | ActiveRecord: 1.8ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.7ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 13], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/13/adhesions/new" for 127.0.0.1 at 2014-12-27 08:30:35 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"13"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 13]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.7ms | ActiveRecord: 2.3ms)  (1.0ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 13]] Started POST "/adherent/members/13/adhesions" for 127.0.0.1 at 2014-12-27 08:30:35 +0100 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"13"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 13], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 27 Dec 2014 07:30:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/13/adhesions Completed 302 Found in 73ms (ActiveRecord: 3.1ms) Started GET "/adherent/members/13/adhesions" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"13"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Adhesion Exists (1.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 13]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 13]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 9.5ms | ActiveRecord: 4.7ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 13]] SQL (0.5ms) DELETE FROM "adherent_members"  (0.7ms) ROLLBACK  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/14/adhesions/new" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"14"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 14]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.1ms | ActiveRecord: 2.1ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 15], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 15], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 15]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 15]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 15], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/15/payments/new" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"15"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 15]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.9ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/15/payments" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"15"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]] Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 15]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 15], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]] Adherent::Adhesion Load (2.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 15]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] SQL (1.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 14], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/15/payments Completed 302 Found in 27ms (ActiveRecord: 9.1ms) Started GET "/adherent/members/15/payments" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"15"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 15]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (19.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 17.1ms | ActiveRecord: 5.8ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 16], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 16], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 16], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 18]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 18]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 18], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 18]] Started GET "/adherent/members/18/payments/new" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"18"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "18"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 18]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 10.4ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/18/payments" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"18"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "18"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 18]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 16]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 18], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 18]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 15], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/18/payments Completed 302 Found in 19ms (ActiveRecord: 6.6ms) Started GET "/adherent/members/18/payments" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"18"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "18"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 18]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 18]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.7ms | ActiveRecord: 5.7ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 18]]  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 17], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 17], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 17], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 21]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 21]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 21], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/21/payments/new" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"21"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "21"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 21]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.1ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/21/payments" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"21"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "21"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 21]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 17]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 21], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 21]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] SQL (1.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 16], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/21/payments Completed 302 Found in 22ms (ActiveRecord: 7.3ms) Started GET "/adherent/members/21/payments" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"21"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "21"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 21]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 21]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (17.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.8ms | ActiveRecord: 5.9ms)  (1.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 21]]  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 18], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 18], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 24]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 24]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 24], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/24/payments/new" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"24"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "24"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 24]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.8ms | ActiveRecord: 3.6ms) Started POST "/adherent/members/24/payments" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"24"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "24"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 18]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 24], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 24]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] SQL (1.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 17], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/24/payments Completed 302 Found in 22ms (ActiveRecord: 6.8ms) Started GET "/adherent/members/24/payments" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"24"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "24"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 24]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]] Adherent::Reglement Load (5.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (79.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (82.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 89ms (Views: 75.6ms | ActiveRecord: 10.7ms) Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 24]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 27]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 27]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 27], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/27/payments/new" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"27"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "27"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 27]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.0ms | ActiveRecord: 4.3ms) Started POST "/adherent/members/27/payments" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"27"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "27"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 19]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 27], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 27]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 18], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/27/payments Completed 302 Found in 21ms (ActiveRecord: 6.7ms) Started GET "/adherent/members/27/payments" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"27"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "27"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 27]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.4ms | ActiveRecord: 4.8ms)  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 27]]  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 30]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 30]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 30], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/30/payments/new" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"30"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "30"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 30]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.6ms | ActiveRecord: 3.7ms) Started POST "/adherent/members/30/payments" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"30"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "30"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 30]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 20]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 30], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 30]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 19], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["payment_id", 12], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/30/payments Completed 302 Found in 20ms (ActiveRecord: 5.7ms) Started GET "/adherent/members/30/payments" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"30"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "30"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 30]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Reglement Load (2.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 30]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.5ms | ActiveRecord: 6.7ms) Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 30]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 31]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 31]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 31], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 32]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 32]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 32], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/12/reglements/new" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"12"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (1.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 31]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (19.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 17.3ms | ActiveRecord: 7.9ms) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 30]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 30]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 33]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 33]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 33], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/33/payments/new" for 127.0.0.1 at 2014-12-27 08:30:36 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"33"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "33"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 21]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 33]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.3ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/33/payments" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"33"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "33"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 21]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 33], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 33]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 22], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["payment_id", 13], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/33/payments Completed 302 Found in 19ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/33/payments" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"33"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "33"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 33]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.1ms | ActiveRecord: 5.1ms) Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 33]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 34]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 34]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 34], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 35]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 35]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 35], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/13/reglements/new" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"13"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (16.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 15.1ms | ActiveRecord: 6.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.5ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 36]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 36]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 36], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/36/payments/new" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"36"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "36"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 36]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.3ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/36/payments" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"36"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "36"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 36], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 36]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 25], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["payment_id", 14], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/36/payments Completed 302 Found in 20ms (ActiveRecord: 5.7ms) Started GET "/adherent/members/36/payments" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"36"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 36]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (1.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (19.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 17.6ms | ActiveRecord: 6.1ms) Adherent::Payment Load (5.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 36]] Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 37]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 37]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 37], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 38]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 38]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 38], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/14/reglements/new" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"14"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (17.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 16.0ms | ActiveRecord: 6.8ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 39]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 39]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 39], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/39/payments/new" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"39"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "39"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 39]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (12.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 15.9ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/39/payments" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"39"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "39"]]  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 39]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 23]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 39], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 39]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 28], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["payment_id", 15], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/39/payments Completed 302 Found in 20ms (ActiveRecord: 6.1ms) Started GET "/adherent/members/39/payments" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"39"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "39"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 39]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 39]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 39]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.1ms | ActiveRecord: 4.8ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 39]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 40]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 40]]  (0.7ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 40], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 41]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 41]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 41], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/15/reglements/new" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"15"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 39]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 40]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (18.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 19.7ms | ActiveRecord: 5.5ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 42]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 42]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 42], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/42/payments/new" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"42"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "42"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 24]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 42]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.7ms | ActiveRecord: 3.5ms) Started POST "/adherent/members/42/payments" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"42"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "42"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 42]] Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 24]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 42], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 42]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 31], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["payment_id", 16], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/42/payments Completed 302 Found in 19ms (ActiveRecord: 6.5ms) Started GET "/adherent/members/42/payments" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"42"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "42"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 42]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 42]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 42]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.8ms | ActiveRecord: 5.2ms) Adherent::Payment Load (1.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 42]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 43]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 43]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 43], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 44]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 44]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 44], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/16/reglements/new" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"16"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 42]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 44]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 43]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (21.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (34.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 45ms (Views: 33.0ms | ActiveRecord: 5.7ms) Started POST "/adherent/payments/16/reglements" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"32"}, "commit"=>"Enregistrer", "payment_id"=>"16"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "32"]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 32], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["payment_id", 16], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 42]] Redirected to http://www.example.com/adherent/members/42/payments Completed 302 Found in 14ms (ActiveRecord: 5.7ms) Started GET "/adherent/members/42/payments" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"42"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "42"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 42]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 42]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 43]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 42]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.9ms | ActiveRecord: 5.8ms) Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 43]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 45]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 45]]  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 45], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/45/payments/new" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"45"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "45"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 45]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 10.9ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/45/payments" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"45"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "45"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 45]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 25]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 45], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 45]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 34], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["payment_id", 17], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/45/payments Completed 302 Found in 18ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/45/payments" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"45"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "45"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 45]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 45]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 45]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.2ms | ActiveRecord: 4.8ms) Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 45]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 46]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 46]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 46], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 47]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 47]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 47], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/17/reglements/new" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"17"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 45]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 47]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 46]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (18.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 16.9ms | ActiveRecord: 6.2ms) Started POST "/adherent/payments/17/reglements" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"35"}, "commit"=>"Enregistrer", "payment_id"=>"17"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "35"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 35], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00], ["payment_id", 17], ["updated_at", Sat, 27 Dec 2014 07:30:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 45]] Redirected to http://www.example.com/adherent/members/45/payments Completed 302 Found in 14ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/45/payments" for 127.0.0.1 at 2014-12-27 08:30:37 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"45"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "45"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 45]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 45]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 46]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 45]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.6ms | ActiveRecord: 6.0ms)  (1.0ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 48]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 48]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 48], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/48/payments/new" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"48"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "48"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 48]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.7ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/48/payments" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"48"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "48"]]  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 48]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 26]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 48], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 48]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 37], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["payment_id", 18], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/48/payments Completed 302 Found in 20ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/48/payments" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"48"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "48"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 48]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 37]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 48]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 48]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.0ms | ActiveRecord: 4.8ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 48]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 49]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 49]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 49], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 50]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 50]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 50], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/18/reglements/new" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"18"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "18"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 48]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 50]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 49]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (17.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.6ms | ActiveRecord: 5.9ms) Started POST "/adherent/payments/18/reglements" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"38"}, "commit"=>"Enregistrer", "payment_id"=>"18"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "18"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 38], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["payment_id", 18], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 48]] Redirected to http://www.example.com/adherent/members/48/payments Completed 302 Found in 14ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/48/payments" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"48"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "48"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 48]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 37]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 48]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 49]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 48]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (17.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (20.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 17.2ms | ActiveRecord: 6.7ms) Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 37]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 48]]  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (2.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 51]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 51]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 51], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/51/payments/new" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"51"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "51"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 51]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 40]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 10.2ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/51/payments" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"51"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "51"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 51]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 27]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 51], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 51]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 40]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 40], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/51/payments Completed 302 Found in 18ms (ActiveRecord: 5.6ms) Started GET "/adherent/members/51/payments" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"51"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "51"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 51]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 40]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 51]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 51]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.5ms | ActiveRecord: 5.3ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 51]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 52]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 52]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 52], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 53]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 53]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 53], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/19/reglements/new" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"19"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "19"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 51]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 53]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 42]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 52]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 41]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (16.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 15.3ms | ActiveRecord: 6.4ms) Started POST "/adherent/payments/19/reglements" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"41"}, "commit"=>"Enregistrer", "payment_id"=>"19"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "19"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 41]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 41], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 51]] Redirected to http://www.example.com/adherent/members/51/payments Completed 302 Found in 14ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/51/payments" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"51"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "51"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 51]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 40]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 51]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 41]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 52]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 51]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.5ms | ActiveRecord: 6.0ms) Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 52]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 41]]  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 54]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 54]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 54], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/54/payments/new" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"54"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "54"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 54]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 43]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 10.1ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/54/payments" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"54"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "54"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 54]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 28]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 54], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 54]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 43]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 43], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["payment_id", 20], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/54/payments Completed 302 Found in 18ms (ActiveRecord: 5.9ms) Started GET "/adherent/members/54/payments" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"54"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "54"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 54]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 43]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 54]] Adherent::Reglement Load (5.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 54]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (79.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (81.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 88ms (Views: 74.9ms | ActiveRecord: 10.6ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 54]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 55]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 55]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 55], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 56]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 56]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 56], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/20/reglements/new" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"20"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "20"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 54]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 55]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 44]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 56]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (17.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.6ms | ActiveRecord: 6.1ms) Started POST "/adherent/payments/20/reglements" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"44"}, "commit"=>"Enregistrer", "payment_id"=>"20"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "20"]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "44"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]]  (1.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 44]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 44], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["payment_id", 20], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 54]] Redirected to http://www.example.com/adherent/members/54/payments Completed 302 Found in 15ms (ActiveRecord: 6.8ms) Started GET "/adherent/members/54/payments" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"54"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "54"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 54]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 43]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 54]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 44]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 55]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 54]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 15.9ms | ActiveRecord: 6.2ms)  (1.1ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 29], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 29], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 57]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 57]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 57], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/57/payments/new" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"57"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "57"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 57]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.5ms | ActiveRecord: 3.8ms) Started POST "/adherent/members/57/payments" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"57"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "57"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 57]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 57], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 57]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 46], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["payment_id", 21], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/57/payments Completed 302 Found in 18ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/57/payments" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"57"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "57"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 57]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 46]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 57]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 57]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (13.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.6ms | ActiveRecord: 4.5ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 57]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 30], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 30], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 60]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 60]]  (0.7ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 60], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/60/payments/new" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"60"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "60"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 60]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 47]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.3ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/60/payments" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"60"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "60"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 60]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 30]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 60], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 60]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 47]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 47], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00], ["payment_id", 22], ["updated_at", Sat, 27 Dec 2014 07:30:38 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/60/payments Completed 302 Found in 19ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/60/payments" for 127.0.0.1 at 2014-12-27 08:30:38 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"60"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "60"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 60]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 47]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 60]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 60]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.5ms | ActiveRecord: 5.1ms)  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 60]]  (0.4ms) ROLLBACK  (0.6ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.9ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (4.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:25 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 31]]  (2.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 63]] Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 63]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 64]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 64]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 65]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 65]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 66]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 66]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 67]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 67]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (77.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 216ms (Views: 185.9ms | ActiveRecord: 15.2ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:25 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 32]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 68]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 68]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 69]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 69]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 70]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 70]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 71]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 71]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 72]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 72]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (80.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 86ms (Views: 77.1ms | ActiveRecord: 7.2ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) COMMIT  (0.4ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (2.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2014-12-27 08:32:25 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (30.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/new.html.erb within layouts/adherent/application (34.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 41ms (Views: 37.4ms | ActiveRecord: 0.7ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:25 +0100 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/78/coord/new Completed 302 Found in 10ms (ActiveRecord: 2.3ms) Started GET "/adherent/members/78/coord/new" for 127.0.0.1 at 2014-12-27 08:32:25 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"78"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "78"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 78]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (20.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 43ms (Views: 24.7ms | ActiveRecord: 3.5ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 34], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 34], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 34], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 34], ["updated_at", Sat, 27 Dec 2014 07:32:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:25 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 34]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 79]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 79]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 80]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 80]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 81]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 81]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 82]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 82]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 83]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 83]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (28.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 25.4ms | ActiveRecord: 6.2ms) Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/79/payments" for 127.0.0.1 at 2014-12-27 08:32:26 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"79"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "79"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 79]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 11.0ms | ActiveRecord: 3.5ms)  (0.4ms) ROLLBACK  (0.7ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (1.2ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 35], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 35], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 35], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 35], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 35], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:26 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 35]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 84]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 84]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 85]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 85]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 86]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 86]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 87]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 87]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 88]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 88]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (29.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 25.4ms | ActiveRecord: 6.6ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 84]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 84]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 84], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/84/adhesions" for 127.0.0.1 at 2014-12-27 08:32:26 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"84"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "84"]] Adherent::Adhesion Exists (1.0ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 84]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 84]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (19.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 18.8ms | ActiveRecord: 6.5ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 36], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 36], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 36], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 36], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 36], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:26 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 36]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 89]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 89]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 90]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 90]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 91]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 91]]  (1.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 92]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 92]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 93]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 93]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (27.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 23.2ms | ActiveRecord: 7.3ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/89/edit" for 127.0.0.1 at 2014-12-27 08:32:26 +0100 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"89"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "89"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/edit.html.erb within layouts/adherent/application (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 13.9ms | ActiveRecord: 1.2ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 37], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 37], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 37], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 37], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 37], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:26 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 37]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 94]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 94]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 95]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 95]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 96]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 96]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 97]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 97]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 98]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 98]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (28.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 25.0ms | ActiveRecord: 6.4ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/94/adhesions" for 127.0.0.1 at 2014-12-27 08:32:26 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"94"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "94"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 94]] Redirected to http://www.example.com/adherent/members/94/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.7ms) Started GET "/adherent/members/94/adhesions/new" for 127.0.0.1 at 2014-12-27 08:32:26 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"94"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "94"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 94]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 94]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (12.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.8ms | ActiveRecord: 2.2ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 38], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 38], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 38], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 38], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 38], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:26 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 38]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 99]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 99]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 100]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 100]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 101]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 101]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 102]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 102]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 103]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 103]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (27.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 25.6ms | ActiveRecord: 5.9ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["member_id", 99], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 99]] Started GET "/adherent/members/99/coord" for 127.0.0.1 at 2014-12-27 08:32:26 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"99"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "99"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 99]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/show.html.erb within layouts/adherent/application (6.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 71ms (Views: 66.5ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 39], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 39], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 39], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 39], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 39], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:26 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 39]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 104]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 104]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 105]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 105]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 106]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 106]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 107]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 107]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 108]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 108]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (28.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 25.2ms | ActiveRecord: 6.8ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2014-12-27 08:32:26 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/new.html.erb within layouts/adherent/application (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 12.5ms | ActiveRecord: 0.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 40], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 40], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 40], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 40], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 40], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:26 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 40]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 109]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 109]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 110]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 110]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 111]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 111]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 112]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 112]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 113]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 113]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (29.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 25.6ms | ActiveRecord: 6.5ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/109/coord" for 127.0.0.1 at 2014-12-27 08:32:26 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"109"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "109"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 109]] Redirected to http://www.example.com/adherent/members/109/coord/new Completed 302 Found in 6ms (ActiveRecord: 1.6ms) Started GET "/adherent/members/109/coord/new" for 127.0.0.1 at 2014-12-27 08:32:26 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"109"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "109"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 109]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (19.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 21.7ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 41], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 114]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 114]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 114], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/114/payments/new" for 127.0.0.1 at 2014-12-27 08:32:26 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"114"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]] Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 41]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 114]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (16.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 38ms (Views: 19.1ms | ActiveRecord: 4.9ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 42], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 115]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 115]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 115], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/115/payments/new" for 127.0.0.1 at 2014-12-27 08:32:26 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"115"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "115"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 42]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 115]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 10.7ms | ActiveRecord: 3.0ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 43], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 116]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 116]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 116], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 116]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 43]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 116], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 116]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/116/payments" for 127.0.0.1 at 2014-12-27 08:32:26 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"116"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "116"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 116]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 116]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (20.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 18.0ms | ActiveRecord: 5.1ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 44], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 117]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 117]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 117], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 44]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 117], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 117]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/117/payments" for 127.0.0.1 at 2014-12-27 08:32:27 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"117"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 117]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (12.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.4ms | ActiveRecord: 4.3ms) Started GET "/adherent/payments/24/reglements/new" for 127.0.0.1 at 2014-12-27 08:32:27 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"24"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "24"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 95ms (Views: 17.0ms | ActiveRecord: 4.8ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 45], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 118]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 118]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 118], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 118]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 45]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 118], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 118]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/118/payments/25" for 127.0.0.1 at 2014-12-27 08:32:27 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"118", "id"=>"25"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "118"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 25 LIMIT 1 [["member_id", 118]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 118]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (26.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 36ms (Views: 27.4ms | ActiveRecord: 4.9ms) SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 46], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 119]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 119]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 119], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 119]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 46]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 119], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 119]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/119/payments/26" for 127.0.0.1 at 2014-12-27 08:32:27 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"119", "id"=>"26"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "119"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 26 LIMIT 1 [["member_id", 119]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 119]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.4ms | ActiveRecord: 4.5ms) SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (1.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 47], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 120]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 120]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 120], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 47]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 120], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 120]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/120/payments/27" for 127.0.0.1 at 2014-12-27 08:32:27 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"120", "id"=>"27"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]] Adherent::Payment Load (1.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 27 LIMIT 1 [["member_id", 120]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (13.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.5ms | ActiveRecord: 5.4ms) SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 48], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 121]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 121]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 121], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/121/payments/new" for 127.0.0.1 at 2014-12-27 08:32:27 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"121"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "121"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 48]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 121]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.5ms | ActiveRecord: 2.1ms)  (1.2ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 121]] Started POST "/adherent/members/121/payments" for 127.0.0.1 at 2014-12-27 08:32:27 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"121"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "121"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 121]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 48]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 121], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 121]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/121/payments Completed 302 Found in 15ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/121/payments" for 127.0.0.1 at 2014-12-27 08:32:27 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"121"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "121"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 121]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 121]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.3ms | ActiveRecord: 4.3ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 121]] SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 49], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 122]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 122]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 122], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/122/payments/new" for 127.0.0.1 at 2014-12-27 08:32:27 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"122"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "122"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 49]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 122]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.4ms | ActiveRecord: 1.9ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (33.2ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.8ms) BEGIN Adherent::Member Exists (1.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (2.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 50], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (2.9ms) COMMIT Adherent::Member Exists (1.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.9ms) BEGIN Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (2.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 50], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 50], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 50], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 50], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) BEGIN Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 50]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 123], ["mode", "Chèque"], ["updated_at", Sat, 27 Dec 2014 07:32:27 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 123]]  (1.1ms) COMMIT Started GET "/adherent/members/123/payments/29" for 127.0.0.1 at 2014-12-27 08:32:31 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"123", "id"=>"29"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 29 LIMIT 1 [["member_id", 123]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (20.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 19.5ms | ActiveRecord: 14.6ms) Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2014-12-27 08:32:32 +0100 Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2014-12-27 08:32:32 +0100 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2014-12-27 08:32:32 +0100 Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2014-12-27 08:32:32 +0100 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2014-12-27 08:32:32 +0100 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2014-12-27 08:32:32 +0100 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2014-12-27 08:32:32 +0100 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2014-12-27 08:32:32 +0100 Started DELETE "/adherent/members/123/payments/29" for 127.0.0.1 at 2014-12-27 08:32:32 +0100 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"123", "id"=>"29"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Adherent::Payment Load (3.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 123], ["id", "29"]]  (0.5ms) BEGIN Adherent::Reglement Load (2.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] SQL (2.1ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 29]]  (204.6ms) COMMIT Redirected to http://127.0.0.1:39034/adherent/members/123/payments Completed 302 Found in 243ms (ActiveRecord: 214.1ms) Started GET "/adherent/members/123/payments" for 127.0.0.1 at 2014-12-27 08:32:32 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"123"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Adherent::Payment Load (1.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 123]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (4.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 6.5ms | ActiveRecord: 13.9ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2014-12-27 08:32:33 +0100  (1.5ms) SELECT COUNT(*) FROM "adherent_payments"  (1.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (4.6ms) select table_name from information_schema.views where table_schema = 'adh_test'  (174.3ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "organisms", "adherent_members", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (1.2ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.9ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) BEGIN SQL (1.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:33 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:33 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:32:34 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:32:34 UTC +00:00]]  (2.1ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:32:34 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:32:34 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:32:34 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.3ms) BEGIN SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:34 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:34 UTC +00:00]]  (1.4ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2014-12-27 08:32:34 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (1.1ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 9.4ms | ActiveRecord: 5.1ms) Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2014-12-27 08:32:34 +0100 Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2014-12-27 08:32:34 +0100 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (4.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.1ms) BEGIN SQL (2.4ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (119.7ms) COMMIT Redirected to http://127.0.0.1:39034/adherent/members/1/adhesions Completed 302 Found in 147ms (ActiveRecord: 141.6ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2014-12-27 08:32:34 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:39034/adherent/members/1/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 2.1ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2014-12-27 08:32:34 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.7ms | ActiveRecord: 2.9ms) Started GET "/assets/adherent/cal.gif" for 127.0.0.1 at 2014-12-27 08:32:34 +0100  (1.3ms) SELECT COUNT(*) FROM "adherent_adhesions"  (2.0ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (4.5ms) select table_name from information_schema.views where table_schema = 'adh_test'  (140.6ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (1.3ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:35 UTC +00:00]]  (2.2ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:32:35 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:32:35 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:32:35 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:32:35 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.8ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:32:35 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:35 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (33.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 38ms (Views: 29.5ms | ActiveRecord: 7.5ms) Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2014-12-27 08:32:35 +0100 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2014-12-27 08:32:35 +0100 Started GET "/assets/images/sort_asc.png" for 127.0.0.1 at 2014-12-27 08:32:36 +0100 Started GET "/assets/images/back_disabled.png" for 127.0.0.1 at 2014-12-27 08:32:36 +0100 Started GET "/assets/images/sort_both.png" for 127.0.0.1 at 2014-12-27 08:32:36 +0100 Started GET "/assets/images/forward_disabled.png" for 127.0.0.1 at 2014-12-27 08:32:36 +0100 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2014-12-27 08:32:36 +0100 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.1ms) BEGIN Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] SQL (0.5ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (113.2ms) COMMIT Redirected to http://127.0.0.1:39034/adherent/members Completed 302 Found in 122ms (ActiveRecord: 115.4ms) Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:36 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (2.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (32.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 41ms (Views: 23.5ms | ActiveRecord: 14.5ms)  (1.4ms) SELECT COUNT(*) FROM "adherent_members"  (4.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (5.4ms) select table_name from information_schema.views where table_schema = 'adh_test'  (146.2ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_reglements", "organisms", "adherent_members", "adherent_payments" RESTART IDENTITY CASCADE;  (0.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.8ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:37 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:32:37 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/1/coord/new" for 127.0.0.1 at 2014-12-27 08:32:37 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (17.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 19.3ms | ActiveRecord: 3.7ms) Started POST "/adherent/members/1/coord" for 127.0.0.1 at 2014-12-27 08:32:37 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 27 Dec 2014 07:32:37 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 1], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:32:37 UTC +00:00], ["zip", ""]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/1/adhesions/new Completed 302 Found in 11ms (ActiveRecord: 3.9ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2014-12-27 08:32:37 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.0ms | ActiveRecord: 2.2ms) Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (0.6ms) ROLLBACK  (0.5ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:37 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Sat, 27 Dec 2014 07:32:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/2/coord/new" for 127.0.0.1 at 2014-12-27 08:32:37 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"2"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Coord Load (1.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (19.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 21.3ms | ActiveRecord: 3.6ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/2/coord" for 127.0.0.1 at 2014-12-27 08:32:37 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"2"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 27 Dec 2014 07:32:37 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 2], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:32:37 UTC +00:00], ["zip", ""]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/2/adhesions/new Completed 302 Found in 11ms (ActiveRecord: 3.7ms) Started GET "/adherent/members/2/adhesions/new" for 127.0.0.1 at 2014-12-27 08:32:37 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"2"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 2]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.2ms | ActiveRecord: 2.4ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:37 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:37 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Sat, 27 Dec 2014 07:32:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/3/coord/new" for 127.0.0.1 at 2014-12-27 08:32:37 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"3"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (18.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 20.4ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/3/coord" for 127.0.0.1 at 2014-12-27 08:32:37 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"3"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 27 Dec 2014 07:32:37 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 3], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:32:37 UTC +00:00], ["zip", ""]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/3/adhesions/new Completed 302 Found in 11ms (ActiveRecord: 3.7ms) Started GET "/adherent/members/3/adhesions/new" for 127.0.0.1 at 2014-12-27 08:32:37 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"3"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 3]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 12.3ms | ActiveRecord: 3.3ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.9ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/4/coord/new" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"4"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (18.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 20.3ms | ActiveRecord: 2.0ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 5], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 5], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 5], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 5]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 5], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/5/payments/new" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"5"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 5]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 11.9ms | ActiveRecord: 7.4ms) Started POST "/adherent/members/5/payments" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"5"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 5]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 5], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] SQL (1.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 1], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/5/payments Completed 302 Found in 23ms (ActiveRecord: 6.9ms) Started GET "/adherent/members/5/payments" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"5"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 5]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (20.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 17.3ms | ActiveRecord: 7.0ms) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]]  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 6], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 6], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 6], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 8]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 8]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 8], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/8/payments/new" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"8"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]] Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 6]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 11.4ms | ActiveRecord: 6.9ms) Started POST "/adherent/members/8/payments" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"8"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 6]] SQL (1.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 8], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 2], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["payment_id", 2], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/8/payments Completed 302 Found in 20ms (ActiveRecord: 7.1ms) Started GET "/adherent/members/8/payments" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"8"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 8]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 2]] Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.1ms | ActiveRecord: 6.1ms)  (1.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 7], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 7], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 7], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 11]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 11], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/11/payments/new" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"11"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 12.5ms | ActiveRecord: 4.7ms) Started POST "/adherent/members/11/payments" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"11"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]]  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 7]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 11], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 3], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["payment_id", 3], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/11/payments Completed 302 Found in 21ms (ActiveRecord: 7.0ms) Started GET "/adherent/members/11/payments" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"11"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 11]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 3]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (17.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 15.3ms | ActiveRecord: 6.4ms) Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 11]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 8], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 8], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 8], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 14]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 14]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 14], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/14/payments/new" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"14"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 8]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.7ms | ActiveRecord: 3.6ms) Started POST "/adherent/members/14/payments" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"14"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 8]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 14], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 4], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["payment_id", 4], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/14/payments Completed 302 Found in 19ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/14/payments" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"14"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 14]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 4]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (4.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (81.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (84.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 91ms (Views: 78.6ms | ActiveRecord: 10.0ms)  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]]  (0.3ms) ROLLBACK  (0.6ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 9], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 9], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 9], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 17]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 17]]  (0.5ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 17], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/17/payments/new" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"17"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 9]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 11.7ms | ActiveRecord: 5.6ms) Started POST "/adherent/members/17/payments" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"17"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 9]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 17], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 5], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["payment_id", 5], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/17/payments Completed 302 Found in 21ms (ActiveRecord: 7.5ms) Started GET "/adherent/members/17/payments" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"17"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 17]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 5]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.4ms | ActiveRecord: 6.2ms) Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 17]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 18]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 18]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 18], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 19]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 19]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 19], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/5/reglements/new" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"5"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 18]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (17.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (20.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 18.7ms | ActiveRecord: 8.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 10], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 10], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 10], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 20]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 20]]  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 20], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/20/payments/new" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"20"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "20"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 10]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 20]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.3ms | ActiveRecord: 3.7ms) Started POST "/adherent/members/20/payments" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"20"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "20"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 10]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 20], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 20]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 8], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["payment_id", 6], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/20/payments Completed 302 Found in 21ms (ActiveRecord: 6.7ms) Started GET "/adherent/members/20/payments" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"20"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "20"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 20]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 8]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.6ms | ActiveRecord: 5.1ms) Adherent::Payment Load (1.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 20]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 21]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 21]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 21], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 22]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 22]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 22], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/6/reglements/new" for 127.0.0.1 at 2014-12-27 08:32:38 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"6"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (2.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "6"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Reglement Load (1.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 21]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (17.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 18.0ms | ActiveRecord: 9.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.7ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 11], ["updated_at", Sat, 27 Dec 2014 07:32:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 11], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 11], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 23]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 23]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 23], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/23/payments/new" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"23"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 11]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 23]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.1ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/23/payments" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"23"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 11]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 23], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 23]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 11], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/23/payments Completed 302 Found in 20ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/23/payments" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"23"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 23]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 11]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.7ms | ActiveRecord: 5.2ms) Adherent::Payment Load (1.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 23]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 24]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 24]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 24], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 25]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 25]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 25], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/7/reglements/new" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"7"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (18.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 17.6ms | ActiveRecord: 7.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 12], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 12], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 12], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 26]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 26]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 26], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/26/payments/new" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"26"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 12]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.5ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/26/payments" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"26"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 12]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 26], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 14], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/26/payments Completed 302 Found in 21ms (ActiveRecord: 6.5ms) Started GET "/adherent/members/26/payments" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"26"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 26]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.3ms | ActiveRecord: 5.6ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 26]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 27]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 27]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 27], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 28]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 28]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 28], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/8/reglements/new" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"8"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 28]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (18.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 17.0ms | ActiveRecord: 7.7ms) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 26]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 13], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 13], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 13], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 29]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 29]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 29], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/29/payments/new" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"29"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 29]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.6ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/29/payments" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"29"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 13]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 29], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 29]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 17], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/29/payments Completed 302 Found in 21ms (ActiveRecord: 5.9ms) Started GET "/adherent/members/29/payments" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"29"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 29]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.4ms | ActiveRecord: 4.7ms) Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 29]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 30]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 30]]  (0.8ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 30], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 31]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 31]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 31], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/9/reglements/new" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"9"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 30]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 31]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (19.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 18.3ms | ActiveRecord: 6.3ms) Started POST "/adherent/payments/9/reglements" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"18"}, "commit"=>"Enregistrer", "payment_id"=>"9"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "18"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 18], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Redirected to http://www.example.com/adherent/members/29/payments Completed 302 Found in 13ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/29/payments" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"29"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 29]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.8ms | ActiveRecord: 5.6ms) Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (1.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 14], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 14], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 32]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 32]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 32], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/32/payments/new" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"32"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 32]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.3ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/32/payments" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"32"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 14]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 32], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 32]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 20], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/32/payments Completed 302 Found in 19ms (ActiveRecord: 5.6ms) Started GET "/adherent/members/32/payments" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"32"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 32]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.0ms | ActiveRecord: 4.7ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 32]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 33]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 33]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 33], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 34]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 34]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 34], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/10/reglements/new" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"10"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (17.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 16.8ms | ActiveRecord: 6.5ms) Started POST "/adherent/payments/10/reglements" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"21"}, "commit"=>"Enregistrer", "payment_id"=>"10"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "21"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 21], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Redirected to http://www.example.com/adherent/members/32/payments Completed 302 Found in 15ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/32/payments" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"32"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 32]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 21]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.6ms | ActiveRecord: 5.3ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 15], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 15], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 35]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 35]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 35], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/35/payments/new" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"35"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 35]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 13.9ms | ActiveRecord: 3.5ms) Started POST "/adherent/members/35/payments" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"35"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 15]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 35], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 35]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 23], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 27 Dec 2014 07:32:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/35/payments Completed 302 Found in 20ms (ActiveRecord: 5.9ms) Started GET "/adherent/members/35/payments" for 127.0.0.1 at 2014-12-27 08:32:39 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"35"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 35]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (17.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.8ms | ActiveRecord: 4.4ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 35]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 36]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 36]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 36], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 37]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 37]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 37], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/11/reglements/new" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"11"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (18.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 16.9ms | ActiveRecord: 6.2ms) Started POST "/adherent/payments/11/reglements" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"24"}, "commit"=>"Enregistrer", "payment_id"=>"11"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "24"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 24], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Redirected to http://www.example.com/adherent/members/35/payments Completed 302 Found in 13ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/35/payments" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"35"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 35]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 24]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.1ms | ActiveRecord: 5.6ms) Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 36]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 16], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 16], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 16], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 38]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 38]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 38], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/38/payments/new" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"38"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 38]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.5ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/38/payments" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"38"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 16]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 38], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 38]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 26], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["payment_id", 12], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/38/payments Completed 302 Found in 20ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/38/payments" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"38"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 38]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.6ms | ActiveRecord: 4.6ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 38]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 39]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 39]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 39], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 40]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 40]]  (0.7ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 40], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/12/reglements/new" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"12"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 40]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 39]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (17.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.2ms | ActiveRecord: 6.3ms) Started POST "/adherent/payments/12/reglements" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"27"}, "commit"=>"Enregistrer", "payment_id"=>"12"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "27"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 27], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["payment_id", 12], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Redirected to http://www.example.com/adherent/members/38/payments Completed 302 Found in 13ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/38/payments" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"38"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 38]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 39]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.2ms | ActiveRecord: 7.9ms) Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 39]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (2.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 17], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 17], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 17], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 41]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 41]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 41], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/41/payments/new" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"41"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 41]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.8ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/41/payments" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"41"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]]  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 17]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 41], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 41]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 29], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["payment_id", 13], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/41/payments Completed 302 Found in 25ms (ActiveRecord: 7.4ms) Started GET "/adherent/members/41/payments" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"41"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 41]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (17.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 15.8ms | ActiveRecord: 5.6ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 41]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 42]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 42]]  (0.6ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 42], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 43]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 43]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 43], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/13/reglements/new" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"13"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 42]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 43]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (18.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 17.6ms | ActiveRecord: 5.1ms) Started POST "/adherent/payments/13/reglements" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"30"}, "commit"=>"Enregistrer", "payment_id"=>"13"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "30"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (5.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 30], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["payment_id", 13], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Redirected to http://www.example.com/adherent/members/41/payments Completed 302 Found in 81ms (ActiveRecord: 10.4ms) Started GET "/adherent/members/41/payments" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"41"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 41]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 42]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (19.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 18.3ms | ActiveRecord: 3.8ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 18], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 18], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 44]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 44]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 44], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/44/payments/new" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"44"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "44"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.7ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/44/payments" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"44"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "44"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 44]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 18]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 44], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 32], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["payment_id", 14], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/44/payments Completed 302 Found in 19ms (ActiveRecord: 5.6ms) Started GET "/adherent/members/44/payments" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"44"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "44"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 44]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 44]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 44]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.1ms | ActiveRecord: 5.0ms)  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (2.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1  (1.8ms) SAVEPOINT active_record_1 Adherent::Member Exists (3.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 47]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 47]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 47], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/47/payments/new" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"47"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 47]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.6ms | ActiveRecord: 3.2ms) Started POST "/adherent/members/47/payments" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"47"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 47]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 19]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 47], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 47]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 33], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["payment_id", 15], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/47/payments Completed 302 Found in 20ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/47/payments" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"47"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 47]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 47]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 47]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.8ms | ActiveRecord: 5.3ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.6ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 50]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 50]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 50], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 50]] Started GET "/adherent/members/50/payments/new" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"50"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "50"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 50]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.6ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/50/payments" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"50"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "50"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 50]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 20]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 50], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 50]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 34], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["payment_id", 16], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/50/payments Completed 302 Found in 18ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/50/payments" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"50"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "50"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 50]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 50]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 50]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.2ms | ActiveRecord: 5.8ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 50]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 53], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:32:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/53/adhesions" for 127.0.0.1 at 2014-12-27 08:32:40 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"53"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "53"]] Adherent::Adhesion Exists (1.0ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 53]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 53]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 9.3ms | ActiveRecord: 5.5ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 54], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/54/adhesions" for 127.0.0.1 at 2014-12-27 08:32:41 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"54"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "54"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 54]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 54]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (7.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 8.1ms | ActiveRecord: 2.8ms) Started GET "/adherent/members/54/payments/new" for 127.0.0.1 at 2014-12-27 08:32:41 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"54"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "54"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 54]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 10.2ms | ActiveRecord: 3.1ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 55], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/55/adhesions" for 127.0.0.1 at 2014-12-27 08:32:41 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"55"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "55"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 55]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 55]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 9.7ms | ActiveRecord: 2.8ms) Started GET "/adherent/members/55/adhesions/37/edit" for 127.0.0.1 at 2014-12-27 08:32:41 +0100 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"55", "id"=>"37"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "55"]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 55], ["id", "37"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/edit.html.erb within layouts/adherent/application (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.8ms | ActiveRecord: 2.1ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/56/adhesions/new" for 127.0.0.1 at 2014-12-27 08:32:41 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"56"} Organism Load (4.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "56"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 56]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 56]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 11.5ms | ActiveRecord: 6.8ms)  (1.1ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 56]] Started POST "/adherent/members/56/adhesions" for 127.0.0.1 at 2014-12-27 08:32:41 +0100 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"56"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "56"]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 56], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/56/adhesions Completed 302 Found in 9ms (ActiveRecord: 2.9ms) Started GET "/adherent/members/56/adhesions" for 127.0.0.1 at 2014-12-27 08:32:41 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"56"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "56"]] Adherent::Adhesion Exists (1.0ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 56]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 56]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 9.3ms | ActiveRecord: 3.3ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 56]] SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 07:32:41 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/57/adhesions/new" for 127.0.0.1 at 2014-12-27 08:32:41 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"57"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "57"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 57]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 57]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.8ms | ActiveRecord: 2.3ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (1.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (4.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (1.0ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 58], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 58]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 58]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 58], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 58]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 26]]  (0.4ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 59], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 59]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 59]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 59], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 59]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 27]] SQL (2.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 59], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]] Adherent::Adhesion Load (2.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 59]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 41]] SQL (1.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 41], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["payment_id", 17], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 42]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 42], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["payment_id", 17], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 60], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 60]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 60]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 60], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 60]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 28]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.5ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 61], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 61]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 61]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 61], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 61]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 61], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 61]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 45], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["payment_id", 18], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 62], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 62]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 62]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 62], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 62]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 30]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 62], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 62]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 47]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 47], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 48], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 07:32:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:58 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 31]]  (1.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 63]] Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 63]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 64]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 64]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 65]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 65]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 66]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 66]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 67]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 67]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (53.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 183ms (Views: 168.8ms | ActiveRecord: 10.9ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:59 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 32]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 68]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 68]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 69]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 69]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 70]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 70]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 71]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 71]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 72]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 72]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (27.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 24.5ms | ActiveRecord: 5.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2014-12-27 08:32:59 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (34.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/new.html.erb within layouts/adherent/application (39.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 45ms (Views: 42.0ms | ActiveRecord: 0.7ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:59 +0100 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/78/coord/new Completed 302 Found in 11ms (ActiveRecord: 2.8ms) Started GET "/adherent/members/78/coord/new" for 127.0.0.1 at 2014-12-27 08:32:59 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"78"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "78"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 78]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (19.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (21.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 99ms (Views: 25.9ms | ActiveRecord: 3.4ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 34], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 34], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 34], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 34], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:59 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 34]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 79]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 79]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 80]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 80]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 81]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 81]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 82]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 82]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 83]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 83]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (29.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 25.3ms | ActiveRecord: 6.6ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 79]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 79]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 79], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/79/adhesions" for 127.0.0.1 at 2014-12-27 08:32:59 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"79"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "79"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 79]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 79]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 49]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 49]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.5ms | ActiveRecord: 3.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 35], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 35], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 35], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 35], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (1.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 35], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:59 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 35]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 84]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 84]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 85]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 85]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 86]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 86]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 87]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 87]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 88]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 88]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (29.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 25.4ms | ActiveRecord: 6.4ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/84/edit" for 127.0.0.1 at 2014-12-27 08:32:59 +0100 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"84"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "84"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/edit.html.erb within layouts/adherent/application (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 14.7ms | ActiveRecord: 1.1ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 36], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 36], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 36], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 36], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 36], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:59 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (1.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 36]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 89]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 89]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 90]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 90]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 91]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 91]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 92]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 92]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 93]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 93]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (29.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 25.7ms | ActiveRecord: 7.6ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/89/payments" for 127.0.0.1 at 2014-12-27 08:32:59 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"89"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "89"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 89]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (7.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 9.9ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.6ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 37], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 37], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 37], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 37], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 37], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:59 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 37]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 94]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 94]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 95]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 95]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 96]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 96]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 97]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 97]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 98]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 98]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (28.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 25.3ms | ActiveRecord: 6.0ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/94/coord" for 127.0.0.1 at 2014-12-27 08:32:59 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"94"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "94"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 94]] Redirected to http://www.example.com/adherent/members/94/coord/new Completed 302 Found in 6ms (ActiveRecord: 1.7ms) Started GET "/adherent/members/94/coord/new" for 127.0.0.1 at 2014-12-27 08:32:59 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"94"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "94"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 94]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (16.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 18.8ms | ActiveRecord: 1.5ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 38], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 38], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 38) LIMIT 1  (1.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 38], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 38], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 38], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:32:59 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 38]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 99]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 99]]  (1.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 100]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 100]]  (1.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 101]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 101]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 102]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 102]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 103]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 103]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (93.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 98ms (Views: 88.3ms | ActiveRecord: 7.9ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2014-12-27 08:32:59 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/new.html.erb within layouts/adherent/application (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 12.0ms | ActiveRecord: 0.8ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 39], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 39], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 39], ["updated_at", Sat, 27 Dec 2014 07:32:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 39], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 39], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:33:00 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 39]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 104]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 104]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 105]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 105]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 106]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 106]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 107]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 107]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 108]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 108]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (27.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 24.8ms | ActiveRecord: 5.9ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.8ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["member_id", 104], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 104]] Started GET "/adherent/members/104/coord" for 127.0.0.1 at 2014-12-27 08:33:00 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"104"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "104"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 104]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/show.html.erb within layouts/adherent/application (2.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 10ms (Views: 5.7ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.8ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 40], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 40], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 40], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 40], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 40], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:33:00 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 40]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 109]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 109]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 110]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 110]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 111]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 111]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 112]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 112]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 113]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 113]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (28.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 25.9ms | ActiveRecord: 5.5ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/109/adhesions" for 127.0.0.1 at 2014-12-27 08:33:00 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"109"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "109"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 109]] Redirected to http://www.example.com/adherent/members/109/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 2.1ms) Started GET "/adherent/members/109/adhesions/new" for 127.0.0.1 at 2014-12-27 08:33:00 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"109"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "109"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 109]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 109]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 15.1ms | ActiveRecord: 2.0ms)  (0.6ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 41], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 41], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 114], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 115], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 115]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 41]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 115], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 115]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 51]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 51], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["payment_id", 20], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 42], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (2.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 42], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 116], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 117], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 42]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 117], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 117]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 53]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 53], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["payment_id", 21], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 116]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 42]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 116], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 116]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 52]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 52], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["payment_id", 22], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 43], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 43], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 118], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 119], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 119]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 43]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 119], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 119]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["payment_id", 23], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 119]] Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 43]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 119], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 119]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["payment_id", 24], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 118]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 43]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 118], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 118]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 54]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 54], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["payment_id", 25], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.5ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 56]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 56], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 56]]  (0.2ms) ROLLBACK  (0.5ms) BEGIN  (0.2ms) COMMIT  (0.6ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 57]]  (0.5ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 57], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 57]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 57]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.5ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 58]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 58], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x68d7178 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.9ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x68d71a0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x68eecd8 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.6ms | ActiveRecord: 2.2ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x69099a2 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 47], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 120], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/120/adhesions" for 127.0.0.1 at 2014-12-27 08:33:00 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"120"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 120]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 120]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 7.6ms | ActiveRecord: 2.7ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.6ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 48], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 121], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/121/adhesions" for 127.0.0.1 at 2014-12-27 08:33:00 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"121"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "121"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 121]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 121]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 79ms (Views: 73.3ms | ActiveRecord: 2.6ms) Started GET "/adherent/members/121/payments/new" for 127.0.0.1 at 2014-12-27 08:33:00 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"121"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "121"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 48]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 121]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 18.6ms | ActiveRecord: 3.4ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 49], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 122], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/122/adhesions" for 127.0.0.1 at 2014-12-27 08:33:00 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"122"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "122"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 122]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 122]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 61]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 61]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 8.1ms | ActiveRecord: 3.4ms) Started GET "/adherent/members/122/adhesions/61/edit" for 127.0.0.1 at 2014-12-27 08:33:00 +0100 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"122", "id"=>"61"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "122"]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 122], ["id", "61"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 12.6ms | ActiveRecord: 2.0ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 50], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/123/adhesions/new" for 127.0.0.1 at 2014-12-27 08:33:00 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"123"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 123]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 123]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.1ms | ActiveRecord: 1.8ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 123]] Started POST "/adherent/members/123/adhesions" for 127.0.0.1 at 2014-12-27 08:33:00 +0100 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"123"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 123], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/123/adhesions Completed 302 Found in 8ms (ActiveRecord: 2.4ms) Started GET "/adherent/members/123/adhesions" for 127.0.0.1 at 2014-12-27 08:33:00 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"123"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 123]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 123]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 8.1ms | ActiveRecord: 3.1ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 123]] SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 51], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/124/adhesions/new" for 127.0.0.1 at 2014-12-27 08:33:00 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"124"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "124"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 124]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 124]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (6.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.0ms | ActiveRecord: 2.2ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 52], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 52], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 52], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 125]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 125]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 125], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/125/payments/new" for 127.0.0.1 at 2014-12-27 08:33:00 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"125"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "125"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 52]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 125]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 63]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 10.9ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/125/payments" for 127.0.0.1 at 2014-12-27 08:33:00 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"125"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "125"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 125]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 52]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 125], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 125]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 63]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 63], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00], ["payment_id", 26], ["updated_at", Sat, 27 Dec 2014 07:33:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/125/payments Completed 302 Found in 18ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/125/payments" for 127.0.0.1 at 2014-12-27 08:33:00 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"125"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "125"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 125]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 63]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 125]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 125]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (19.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 30ms (Views: 21.8ms | ActiveRecord: 5.9ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 125]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 126]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 126]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 126], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 127]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 127]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 127], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/26/reglements/new" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"26"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 125]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 64]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (17.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 21.6ms | ActiveRecord: 6.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 53], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 53], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 53], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 128]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 128]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 128], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/128/payments/new" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"128"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "128"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 53]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 128]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 66]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.3ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/128/payments" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"128"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "128"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 128]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 53]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 128], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 128]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 66]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 66], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["payment_id", 27], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/128/payments Completed 302 Found in 19ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/128/payments" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"128"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "128"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 128]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 66]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 128]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 128]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 15.4ms | ActiveRecord: 5.1ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 128]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 129]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 129]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 129], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 130]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 130]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 130], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/27/reglements/new" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"27"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "27"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 128]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Adhesion Load (3.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 67]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 68]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (20.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 18.0ms | ActiveRecord: 9.1ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 128]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 128]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 54], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (2.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 54], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 54], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 131]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 131]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 131], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/131/payments/new" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"131"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "131"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 54]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 131]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 69]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.0ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/131/payments" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"131"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "131"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 131]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 54]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 131], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 131]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 69]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 69], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["payment_id", 28], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/131/payments Completed 302 Found in 18ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/131/payments" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"131"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "131"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 131]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 69]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 131]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 131]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.7ms | ActiveRecord: 4.2ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 131]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 132]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 132]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 132], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 133]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 133]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 133], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/28/reglements/new" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"28"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "28"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 131]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 70]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.3ms | ActiveRecord: 5.8ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 55], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 55], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 55], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 134]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 134]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 134], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/134/payments/new" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"134"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "134"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 55]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 134]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 72]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.5ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/134/payments" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"134"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "134"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 134]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 55]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 134], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 134]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 72]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 72], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["payment_id", 29], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/134/payments Completed 302 Found in 18ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/134/payments" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"134"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "134"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 134]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 72]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 134]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 134]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.6ms | ActiveRecord: 4.7ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 134]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 135]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 135]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 135], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 136]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 136]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 136], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/29/reglements/new" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"29"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "29"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 134]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 136]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 74]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 135]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 73]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 14.3ms | ActiveRecord: 6.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN SQL (1.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 56], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 56], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 56], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 137]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 137]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 137], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/137/payments/new" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"137"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "137"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 56]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 137]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 75]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.1ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/137/payments" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"137"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "137"]]  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 137]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 56]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 137], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 137]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 75]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 75], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["payment_id", 30], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/137/payments Completed 302 Found in 21ms (ActiveRecord: 6.3ms) Started GET "/adherent/members/137/payments" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"137"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "137"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 137]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 75]] Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 137]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 137]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.3ms | ActiveRecord: 5.4ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 137]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 138]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 138]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 138], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 139]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 139]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 139], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/30/reglements/new" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"30"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "30"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 137]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 76]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 139]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 77]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.4ms | ActiveRecord: 5.9ms) Started POST "/adherent/payments/30/reglements" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"76"}, "commit"=>"Enregistrer", "payment_id"=>"30"} Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "30"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "76"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 76]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 76], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["payment_id", 30], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 137]] Redirected to http://www.example.com/adherent/members/137/payments Completed 302 Found in 14ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/137/payments" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"137"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "137"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 137]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 75]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 137]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 76]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 137]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.2ms | ActiveRecord: 5.5ms) Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 76]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 57], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 57], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 57], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 140]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 140]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 140], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/140/payments/new" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"140"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "140"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 57]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 140]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 78]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.0ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/140/payments" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"140"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "140"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 140]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 57]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 140], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 140]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 78]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 78], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["payment_id", 31], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/140/payments Completed 302 Found in 19ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/140/payments" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"140"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "140"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 140]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 78]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 140]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 140]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.4ms | ActiveRecord: 5.1ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 140]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 141]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 141]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 141], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 142]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 142]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 142], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/31/reglements/new" for 127.0.0.1 at 2014-12-27 08:33:01 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"31"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "31"]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 140]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 80]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 79]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 15.5ms | ActiveRecord: 7.0ms) Started POST "/adherent/payments/31/reglements" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"79"}, "commit"=>"Enregistrer", "payment_id"=>"31"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "31"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "79"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 79]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 79], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["payment_id", 31], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 140]] Redirected to http://www.example.com/adherent/members/140/payments Completed 302 Found in 13ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/140/payments" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"140"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "140"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 140]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 78]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 140]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 79]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 140]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 17.6ms | ActiveRecord: 5.7ms)  (0.5ms) ROLLBACK  (1.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 58], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 58], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 58], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 143]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 143]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 143], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/143/payments/new" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"143"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "143"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 58]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 143]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 81]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.0ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/143/payments" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"143"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "143"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 143]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 58]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 143], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]] Adherent::Adhesion Load (0.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 143]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 81]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 81], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["payment_id", 32], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/143/payments Completed 302 Found in 18ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/143/payments" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"143"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "143"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 143]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 81]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 143]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 143]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.9ms | ActiveRecord: 4.3ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 143]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 144]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 144]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 144], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 145]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 145]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 145], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/32/reglements/new" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"32"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "32"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 143]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Adhesion Load (6.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 144]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 82]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 145]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 83]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (79.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 93ms (Views: 76.4ms | ActiveRecord: 11.4ms) Started POST "/adherent/payments/32/reglements" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"82"}, "commit"=>"Enregistrer", "payment_id"=>"32"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "32"]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "82"]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 82]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 82], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["payment_id", 32], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 143]] Redirected to http://www.example.com/adherent/members/143/payments Completed 302 Found in 14ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/143/payments" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"143"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "143"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 143]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 81]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 143]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 82]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 144]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 143]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.7ms | ActiveRecord: 5.2ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 144]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 82]]  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 59], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 59], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 59], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 146]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 146]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 146], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/146/payments/new" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"146"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "146"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 59]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 146]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 84]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.8ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/146/payments" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"146"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "146"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 146]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 59]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 146], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 146]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 84]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 84], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["payment_id", 33], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/146/payments Completed 302 Found in 18ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/146/payments" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"146"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "146"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 146]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 84]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 146]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 146]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.1ms | ActiveRecord: 4.1ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 146]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 147]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 147]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 147], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 148]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 148]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 148], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/33/reglements/new" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"33"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "33"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 146]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 148]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 86]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 147]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 85]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.1ms | ActiveRecord: 5.9ms) Started POST "/adherent/payments/33/reglements" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"85"}, "commit"=>"Enregistrer", "payment_id"=>"33"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "33"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "85"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 85]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 85], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["payment_id", 33], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 146]] Redirected to http://www.example.com/adherent/members/146/payments Completed 302 Found in 13ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/146/payments" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"146"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "146"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 146]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 84]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 146]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 85]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 147]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 146]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.5ms | ActiveRecord: 5.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 60], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 60], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 60], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 149]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 149]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 149], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/149/payments/new" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"149"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "149"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 60]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 149]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 87]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.2ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/149/payments" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"149"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "149"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 149]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 60]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 149], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 149]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 87]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 87], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["payment_id", 34], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/149/payments Completed 302 Found in 18ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/149/payments" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"149"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "149"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 149]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 87]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 149]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 149]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.1ms | ActiveRecord: 4.3ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 149]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 150]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 150]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 150], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 151]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 151]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 151], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/34/reglements/new" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"34"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "34"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 149]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 151]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 89]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 150]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 88]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 15.6ms | ActiveRecord: 6.3ms) Started POST "/adherent/payments/34/reglements" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"88"}, "commit"=>"Enregistrer", "payment_id"=>"34"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "34"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "88"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 88]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 88], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["payment_id", 34], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 149]] Redirected to http://www.example.com/adherent/members/149/payments Completed 302 Found in 13ms (ActiveRecord: 5.6ms) Started GET "/adherent/members/149/payments" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"149"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "149"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 149]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 87]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 149]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 88]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 150]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 149]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.8ms | ActiveRecord: 5.7ms) Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 87]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 149]]  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 61], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 61], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 61], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 152]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 152]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 152], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 152]] Started GET "/adherent/members/152/payments/new" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"152"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "152"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 61]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 152]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 90]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (74.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 87ms (Views: 78.3ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/152/payments" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"152"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "152"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 152]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 61]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 152], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 152]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 90]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 90], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["payment_id", 35], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/152/payments Completed 302 Found in 18ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/152/payments" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"152"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "152"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 152]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 90]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 152]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 152]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.7ms | ActiveRecord: 4.5ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 152]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 62], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 62], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 62], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 155]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 155]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 155], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/155/payments/new" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"155"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "155"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 62]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 155]]  (1.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 91]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.5ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/155/payments" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"155"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "155"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 155]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 62]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 155], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 155]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 91]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 91], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00], ["payment_id", 36], ["updated_at", Sat, 27 Dec 2014 07:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/155/payments Completed 302 Found in 19ms (ActiveRecord: 5.7ms) Started GET "/adherent/members/155/payments" for 127.0.0.1 at 2014-12-27 08:33:02 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"155"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "155"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 155]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 91]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 155]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 155]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.2ms | ActiveRecord: 4.5ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 63], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 63], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 63], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 158]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 158]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 158], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/158/payments/new" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"158"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "158"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 63]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 158]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 92]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.6ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/158/payments" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"158"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "158"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 158]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 63]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 158], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 158]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 92]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 92], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["payment_id", 37], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/158/payments Completed 302 Found in 18ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/158/payments" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"158"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "158"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 158]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 92]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 158]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 158]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.6ms | ActiveRecord: 4.2ms)  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 158]]  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 64], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 64], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 64], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 161]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 161]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 161], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/161/payments/new" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"161"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "161"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 64]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 161]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 93]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 10.8ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/161/payments" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"161"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "161"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 161]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 64]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 161], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 161]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 93]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 93], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["payment_id", 38], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/161/payments Completed 302 Found in 19ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/161/payments" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"161"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "161"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 161]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 93]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 161]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 161]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.9ms | ActiveRecord: 4.3ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 161]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 65], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 65], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 65], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 164]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 164]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 164], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/164/payments/new" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"164"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "164"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 65]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 164]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 94]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.4ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/164/payments" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"164"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "164"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 164]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 65]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 164], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 164]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 94]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 94], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["payment_id", 39], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/164/payments Completed 302 Found in 20ms (ActiveRecord: 6.0ms) Started GET "/adherent/members/164/payments" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"164"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "164"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 164]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 94]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 164]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 164]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.6ms | ActiveRecord: 4.7ms)  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 164]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 66], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 66], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 66], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 167]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 167]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 167], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/167/payments/new" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"167"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "167"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 66]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 167]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 95]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 10.4ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/167/payments" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"167"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "167"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 167]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 66]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 167], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 167]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 95]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 95], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["payment_id", 40], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/167/payments Completed 302 Found in 19ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/167/payments" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"167"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "167"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 167]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 95]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 167]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 167]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 21ms (Views: 13.6ms | ActiveRecord: 4.7ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 167]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 95]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 67], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 67], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 67], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 170]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 170]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 170], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/170/payments/new" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"170"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "170"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 67]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 170]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 96]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.1ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/170/payments" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"170"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "170"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 170]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 67]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 170], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 170]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 96]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 96], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["payment_id", 41], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/170/payments Completed 302 Found in 18ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/170/payments" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"170"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "170"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 170]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 96]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 170]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 170]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.1ms | ActiveRecord: 4.2ms)  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 170]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (2.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 68], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/173/coord/new" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"173"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "173"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 173]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 18.6ms | ActiveRecord: 1.5ms) Started POST "/adherent/members/173/coord" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"173"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "173"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 173]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 173], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["zip", ""]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/173/adhesions/new Completed 302 Found in 11ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/173/adhesions/new" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"173"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "173"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 173]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 173]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.1ms | ActiveRecord: 1.9ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 69], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/174/coord/new" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"174"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "174"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 174]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 17.9ms | ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 70], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/175/coord/new" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"175"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "175"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 175]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (80.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 89ms (Views: 84.1ms | ActiveRecord: 1.3ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/175/coord" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"175"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "175"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 175]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 175], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/175/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 3.3ms) Started GET "/adherent/members/175/adhesions/new" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"175"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "175"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 175]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 175]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.6ms | ActiveRecord: 2.0ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 71], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/176/coord/new" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"176"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "176"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 176]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 18.9ms | ActiveRecord: 1.7ms) Started POST "/adherent/members/176/coord" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"176"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "176"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 176]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 176], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/176/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 3.0ms) Started GET "/adherent/members/176/adhesions/new" for 127.0.0.1 at 2014-12-27 08:33:03 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"176"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "176"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 176]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 176]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.5ms | ActiveRecord: 1.9ms) Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 176]]  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x630bf32 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x630a8b2 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:03 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.7ms | ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x632a61c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x634bc72 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x63677d8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x6380eae @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6380eae%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 7ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x63a5d62 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x63a5d62%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x63c6382 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x63e7a28 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x6403ebc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6403ebc%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x641f3ba @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64350e8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6469104 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x649a682 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x649a682%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x64c24fc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x64c24fc%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x650dfce @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x65499de @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6578edc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x65a4668 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"27/12/2015", "from_date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x65ea5a0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x65ea5a0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"27/12/2015", "from_date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x662ef3e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x662ef3e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"27/12/2015", "from_date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x67cb5e0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 75ms (Views: 66.6ms | ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5348618 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.2ms | ActiveRecord: 1.7ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x590e926 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x590e926%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5abf2e8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5de57e2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e7e6f4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5e7e6f4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5eefe4e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5eefe4e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x61e1ce2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x620e3fa @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x625645c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62729fe @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 2.3ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.1ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.5ms)  (1.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"177"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/177 Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"178"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/178 Completed 302 Found in 6ms (ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"179"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 179 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 179 [["name", "Dalton"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/179 Completed 302 Found in 14ms (ActiveRecord: 4.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"180"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 110) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 110], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/181/coord/new Completed 302 Found in 12ms (ActiveRecord: 4.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 111) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 111], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/182/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.9ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 113) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 113], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/183/coord/new Completed 302 Found in 12ms (ActiveRecord: 4.0ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.1ms | ActiveRecord: 2.9ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x6483fae @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x649c658 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["member_id", 184], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["zip", 59000]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 184]]  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 8]] SQL (1.5ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 184]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 185]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 185]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 185], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 185]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 185]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 186]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 186]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 186], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 186]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 186]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 187]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 187]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 187], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 187]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 187]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.9ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (35.2ms) COMMIT Adherent::Member Exists (2.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 121) LIMIT 1  (1.7ms) BEGIN Adherent::Member Exists (1.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 121) LIMIT 1 SQL (2.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 121], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (3.6ms) COMMIT Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 121) LIMIT 1  (0.6ms) BEGIN Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 121) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 121], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 121) LIMIT 1  (0.7ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 121) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 121], ["updated_at", Sat, 27 Dec 2014 07:33:04 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 121) LIMIT 1  (0.8ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 121) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 121], ["updated_at", Sat, 27 Dec 2014 07:33:05 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 121) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 121) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 121], ["updated_at", Sat, 27 Dec 2014 07:33:05 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:33:09 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 121]]  (1.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 191]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 191]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 192]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 192]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 193]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 193]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 194]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 194]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 195]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 195]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 94ms (Views: 40.7ms | ActiveRecord: 48.7ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2014-12-27 08:33:10 +0100 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2014-12-27 08:33:10 +0100 Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2014-12-27 08:33:10 +0100 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2014-12-27 08:33:10 +0100 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2014-12-27 08:33:10 +0100 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2014-12-27 08:33:10 +0100 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2014-12-27 08:33:10 +0100 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2014-12-27 08:33:10 +0100 Started GET "/assets/images/sort_asc.png" for 127.0.0.1 at 2014-12-27 08:33:10 +0100 Started GET "/assets/images/sort_both.png" for 127.0.0.1 at 2014-12-27 08:33:10 +0100 Started GET "/assets/images/forward_disabled.png" for 127.0.0.1 at 2014-12-27 08:33:10 +0100 Started GET "/assets/images/back_disabled.png" for 127.0.0.1 at 2014-12-27 08:33:10 +0100 Started DELETE "/adherent/members/191" for 127.0.0.1 at 2014-12-27 08:33:10 +0100 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"191"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "191"]]  (0.1ms) BEGIN Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 191]] SQL (0.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 191]]  (66.9ms) COMMIT Redirected to http://127.0.0.1:37254/adherent/members Completed 302 Found in 98ms (ActiveRecord: 82.6ms) Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:33:10 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 121]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 192]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 192]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 193]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 193]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 194]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 194]]  (2.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 195]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 195]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 23.4ms | ActiveRecord: 7.2ms)  (1.4ms) SELECT COUNT(*) FROM "adherent_members"  (3.5ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (7.8ms) select table_name from information_schema.views where table_schema = 'adh_test'  (50.9ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "organisms", "adherent_members", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (1.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:11 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:11 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:12 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:12 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:12 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:12 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.3ms) BEGIN SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:12 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:12 UTC +00:00]]  (1.4ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2014-12-27 08:33:12 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (1.1ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 14.8ms | ActiveRecord: 5.9ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2014-12-27 08:33:12 +0100 Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2014-12-27 08:33:12 +0100 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (1.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (4.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN SQL (1.9ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (130.7ms) COMMIT Redirected to http://127.0.0.1:37254/adherent/members/1/adhesions Completed 302 Found in 150ms (ActiveRecord: 139.5ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2014-12-27 08:33:12 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:37254/adherent/members/1/adhesions/new Completed 302 Found in 7ms (ActiveRecord: 2.2ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2014-12-27 08:33:12 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 15.8ms | ActiveRecord: 2.9ms) Started GET "/assets/adherent/cal.gif" for 127.0.0.1 at 2014-12-27 08:33:12 +0100  (1.2ms) SELECT COUNT(*) FROM "adherent_adhesions"  (1.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (3.5ms) select table_name from information_schema.views where table_schema = 'adh_test'  (180.2ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (1.6ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:13 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:13 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:13 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:13 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:13 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:13 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) BEGIN Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:13 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Sat, 27 Dec 2014 07:33:13 UTC +00:00]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (2.0ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2014-12-27 08:33:13 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 1]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 38ms (Views: 28.3ms | ActiveRecord: 6.2ms) Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2014-12-27 08:33:13 +0100 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2014-12-27 08:33:13 +0100 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2014-12-27 08:33:14 +0100 Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2014-12-27 08:33:14 +0100 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (3.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] SQL (0.5ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (135.8ms) COMMIT Redirected to http://127.0.0.1:37254/adherent/members/1/payments Completed 302 Found in 157ms (ActiveRecord: 140.7ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2014-12-27 08:33:14 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 8.3ms | ActiveRecord: 6.2ms)  (2.3ms) SELECT COUNT(*) FROM "adherent_payments"  (2.0ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (8.1ms) select table_name from information_schema.views where table_schema = 'adh_test'  (131.3ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "adherent_reglements", "organisms", "adherent_members", "adherent_payments" RESTART IDENTITY CASCADE;  (0.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 1], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2014-12-27 08:33:15 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 1]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 26ms (Views: 17.6ms | ActiveRecord: 4.4ms) SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 2]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 2]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 2], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 2]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 2]] SQL (2.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 2], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]] Adherent::Adhesion Load (2.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/2/payments/2" for 127.0.0.1 at 2014-12-27 08:33:15 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"2", "id"=>"2"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 2 LIMIT 1 [["member_id", 2]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (1.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 2]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 13.0ms | ActiveRecord: 7.3ms) SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members"  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 3]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 3]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 3], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 3]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 3]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 3], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/3/payments/3" for 127.0.0.1 at 2014-12-27 08:33:15 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"3", "id"=>"3"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 3 LIMIT 1 [["member_id", 3]] Adherent::Reglement Load (1.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 3]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 11.9ms | ActiveRecord: 7.4ms) SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 4]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 4], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/4/payments/new" for 127.0.0.1 at 2014-12-27 08:33:15 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"4"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 4]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 16.8ms | ActiveRecord: 2.4ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 4]] Started POST "/adherent/members/4/payments" for 127.0.0.1 at 2014-12-27 08:33:15 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"4"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 4]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 4]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 4], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/4/payments Completed 302 Found in 14ms (ActiveRecord: 4.2ms) Started GET "/adherent/members/4/payments" for 127.0.0.1 at 2014-12-27 08:33:15 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"4"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 4]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.1ms | ActiveRecord: 4.4ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 4]] SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 5], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 5]]  (0.7ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 5], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/5/payments/new" for 127.0.0.1 at 2014-12-27 08:33:15 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"5"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 5]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.9ms | ActiveRecord: 2.2ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 6], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 6]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 6]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 6], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:15 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 6]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 6]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 6], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 6]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/6/payments" for 127.0.0.1 at 2014-12-27 08:33:16 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"6"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "6"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 6]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 6]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.6ms | ActiveRecord: 4.5ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 7], ["updated_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 7]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 7]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 7], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 7]] SQL (1.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 7], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/7/payments" for 127.0.0.1 at 2014-12-27 08:33:16 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"7"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 7]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.2ms | ActiveRecord: 4.2ms) Started GET "/adherent/payments/6/reglements/new" for 127.0.0.1 at 2014-12-27 08:33:16 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"6"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "6"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.7ms | ActiveRecord: 4.6ms) SQL (1.0ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 8], ["updated_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 8]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 8]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 8], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00]]  (1.8ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/8/payments/new" for 127.0.0.1 at 2014-12-27 08:33:16 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"8"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 8]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.3ms | ActiveRecord: 2.3ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (2.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00]]  (1.9ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 9], ["updated_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 9]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 9]]  (0.5ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 9], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:33:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/9/payments/new" for 127.0.0.1 at 2014-12-27 08:33:16 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"9"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "9"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 9]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 9]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.8ms | ActiveRecord: 2.3ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.6ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.7ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (1.6ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (48.1ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (1.0ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (4.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]]  (0.8ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 10], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]]  (1.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 11], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 12], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 10], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 10], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 10], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 11], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 10]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 11], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 14], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 11], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 11], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 12], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 13], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 11]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 13], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 13]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 16], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 12]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 11]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 12], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 12]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 15], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 12], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 12], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 14], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 15], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 12]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 15], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 15]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 18], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 12]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 15], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 15]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 18], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 12]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 14], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 17], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["payment_id", 12], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.6ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 16ms (Views: 6.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 14], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 14], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 14], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 14], ["updated_at", Sat, 27 Dec 2014 07:41:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:41:06 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 14]]  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 16]] Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 16]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 17]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 18]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 18]]  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 19]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 19]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 20]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 174ms (Views: 161.0ms | ActiveRecord: 11.2ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 15], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 15], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 15], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 15], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:41:07 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 15]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 21]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 21]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 22]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 22]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 23]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 23]]  (1.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 24]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 24]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 25]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 23.9ms | ActiveRecord: 6.9ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 16], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 16], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 16], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 16], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 16], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2014-12-27 08:41:07 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (31.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 41ms (Views: 38.5ms | ActiveRecord: 0.6ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2014-12-27 08:41:07 +0100 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 16], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/31/coord/new Completed 302 Found in 10ms (ActiveRecord: 2.5ms) Started GET "/adherent/members/31/coord/new" for 127.0.0.1 at 2014-12-27 08:41:07 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"31"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 44ms (Views: 25.3ms | ActiveRecord: 3.5ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.5ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 17], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 17], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 17], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 17], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 17], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:41:07 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 17]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 32]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 32]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 33]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 33]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 34]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 34]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 35]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 35]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 36]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 36]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 24.8ms | ActiveRecord: 5.8ms) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/32/payments" for 127.0.0.1 at 2014-12-27 08:41:07 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"32"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 32]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 10.1ms | ActiveRecord: 2.2ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 18], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 18], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 18], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 18], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:41:07 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 18]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 37]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 37]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 38]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 38]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 39]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 39]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 40]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 40]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 41]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 41]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 24.1ms | ActiveRecord: 6.6ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["member_id", 37], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 37]] Started GET "/adherent/members/37/coord" for 127.0.0.1 at 2014-12-27 08:41:07 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"37"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "37"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 10ms (Views: 5.5ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:41:07 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 19]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 42]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 42]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 43]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 43]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 44]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 45]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 45]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 46]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 46]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 23.8ms | ActiveRecord: 5.9ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/42/coord" for 127.0.0.1 at 2014-12-27 08:41:07 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"42"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "42"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 42]] Redirected to http://www.example.com/adherent/members/42/coord/new Completed 302 Found in 5ms (ActiveRecord: 1.6ms) Started GET "/adherent/members/42/coord/new" for 127.0.0.1 at 2014-12-27 08:41:07 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"42"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "42"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 42]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 19.0ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:41:07 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 20]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 47]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 47]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 48]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 48]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 49]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 49]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 50]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 50]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 51]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 51]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 24.9ms | ActiveRecord: 6.6ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2014-12-27 08:41:07 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 12.6ms | ActiveRecord: 0.6ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:41:07 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 21]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 52]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 52]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 53]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 53]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 54]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 54]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 55]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 55]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 56]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 56]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 24.7ms | ActiveRecord: 6.4ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 52]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 52]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 52], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/52/adhesions" for 127.0.0.1 at 2014-12-27 08:41:07 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"52"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "52"]] Adherent::Adhesion Exists (1.0ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 52]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 52]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.4ms | ActiveRecord: 3.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (3.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:41:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:41:07 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 22]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 57]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 57]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 58]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 58]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 59]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 59]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 60]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 60]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 61]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 61]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 23.8ms | ActiveRecord: 5.9ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/57/edit" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"57"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "57"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 13.5ms | ActiveRecord: 1.1ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 23]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 62]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 62]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 63]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 63]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 64]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 64]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 65]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 65]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 66]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 66]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 27.5ms | ActiveRecord: 5.3ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/62/adhesions" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"62"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "62"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 62]] Redirected to http://www.example.com/adherent/members/62/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.7ms) Started GET "/adherent/members/62/adhesions/new" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"62"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "62"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 62]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 62]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.1ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x5ea515a @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5ea5182%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 7ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x6054cda @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.4ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x6071042 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 67], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/67/adhesions" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"67"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "67"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 67]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 67]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 7.8ms | ActiveRecord: 2.6ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (1.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (2.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 68], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/68/adhesions" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"68"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 68]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 68]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 7.3ms | ActiveRecord: 3.0ms) Started GET "/adherent/members/68/payments/new" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"68"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 68]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (75.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 90ms (Views: 81.3ms | ActiveRecord: 2.4ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 69], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/69/adhesions" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"69"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "69"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 69]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 69]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 7.7ms | ActiveRecord: 2.8ms) Started GET "/adherent/members/69/adhesions/22/edit" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"69", "id"=>"22"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "69"]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 69], ["id", "22"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (6.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.3ms | ActiveRecord: 3.0ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/70/adhesions/new" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"70"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 70]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 70]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.8ms | ActiveRecord: 1.9ms)  (1.0ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 70]] Started POST "/adherent/members/70/adhesions" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"70"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 70], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/70/adhesions Completed 302 Found in 9ms (ActiveRecord: 2.4ms) Started GET "/adherent/members/70/adhesions" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"70"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 70]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 70]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 8.8ms | ActiveRecord: 2.7ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 70]] SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/71/adhesions/new" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"71"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 71]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 71]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.5ms | ActiveRecord: 2.0ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 72]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 72]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 72], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 72]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 32]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 72], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 72]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/72/payments/13" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"72", "id"=>"13"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "72"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 13 LIMIT 1 [["member_id", 72]] Adherent::Reglement Load (1.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 72]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 36ms (Views: 26.0ms | ActiveRecord: 5.6ms) SQL (1.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 73]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 73]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 73], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 73]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 33]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 73], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 73]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/73/payments/14" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"73", "id"=>"14"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "73"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 14 LIMIT 1 [["member_id", 73]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 73]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.8ms | ActiveRecord: 5.2ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 74]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 74]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 74], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 74]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 34]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 74], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 74]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/74/payments/15" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"74", "id"=>"15"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "74"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 15 LIMIT 1 [["member_id", 74]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 74]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.2ms | ActiveRecord: 4.7ms) SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 35], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 75]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 75]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 75], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/75/payments/new" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"75"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "75"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 75]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (70.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 80ms (Views: 73.6ms | ActiveRecord: 2.1ms)  (1.0ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 75]] Started POST "/adherent/members/75/payments" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"75"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "75"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 75]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 35]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 75], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 75]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/75/payments Completed 302 Found in 16ms (ActiveRecord: 4.1ms) Started GET "/adherent/members/75/payments" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"75"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "75"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 75]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 75]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 16.1ms | ActiveRecord: 3.9ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 75]] SQL (0.7ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.6ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 36], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 76]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 76]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 76], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/76/payments/new" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"76"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "76"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 76]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.8ms | ActiveRecord: 2.2ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 37], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 77]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 77]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 77], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 77]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 37]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 77], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:08 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 77]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/77/payments" for 127.0.0.1 at 2014-12-27 08:41:08 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"77"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "77"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 77]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 77]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.3ms | ActiveRecord: 4.2ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 38], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 78]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 78]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 78], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 78]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 38]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 78], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 78]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/78/payments" for 127.0.0.1 at 2014-12-27 08:41:09 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"78"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "78"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 78]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 78]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.4ms | ActiveRecord: 3.9ms) Started GET "/adherent/payments/18/reglements/new" for 127.0.0.1 at 2014-12-27 08:41:09 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"18"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "18"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 78]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 15.6ms | ActiveRecord: 4.2ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 39], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 79]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 79]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 79], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/79/payments/new" for 127.0.0.1 at 2014-12-27 08:41:09 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"79"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "79"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 39]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 79]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.1ms | ActiveRecord: 2.4ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 40], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 80]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 80]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 80], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/80/payments/new" for 127.0.0.1 at 2014-12-27 08:41:09 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"80"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "80"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 40]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 80]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.9ms | ActiveRecord: 2.1ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5dfef76 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x5e0a5d8 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e3694e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e6a500 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.4ms)  (0.8ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ea5c7c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.2ms)  (0.5ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x6055afe @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6055afe%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (9.3ms) ROLLBACK  (1.6ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x6079f1c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6079f1c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x609bd4c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.6ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 48], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 81], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 81]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 81]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 81], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 81]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 48]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 81], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 81]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 33], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 34], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 49], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 82], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 82]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 82]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 82], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 82]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 49]]  (0.4ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 50], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 83], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 83]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 83]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 83], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 83]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 50]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 51], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (5.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 84], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 84]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 84]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 84], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 84]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 51]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 84], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 84]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 39], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["payment_id", 20], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 52], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 85], ["to_date", Tue, 27 Jan 2015], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 85]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 85]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["from_date", Wed, 28 Jan 2015], ["member_id", 85], ["to_date", Wed, 27 Jan 2016], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 85]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 52]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 85], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 85]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 41]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 41], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["payment_id", 21], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 42]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 42], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["payment_id", 21], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 53], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/86/coord/new Completed 302 Found in 12ms (ActiveRecord: 4.1ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 54], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/87/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.7ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 56], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/88/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.6ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5bb9478 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 2.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5bd354e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"89"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/89 Completed 302 Found in 6ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"90"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/90 Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.6ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"91"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 91 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 91 [["name", "Dalton"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/91 Completed 302 Found in 13ms (ActiveRecord: 4.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"92"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5cc745a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5cfa90e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d25348 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d57582 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5d57582%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d93e10 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5dd51bc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5dd51bc%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e0b4ce @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5e0b4ce%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e4057a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e7c05c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5eb541a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x605bc38 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:09 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 2.0ms | ActiveRecord: 3.0ms)  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.5ms) BEGIN  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 93]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 93]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 93], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 93]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 93]]  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 94]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 94]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 94], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 94]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 94]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 95]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 95]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 95], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 95]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 95]]  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00]]  (20.9ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 81) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 81], ["updated_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 81) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 81], ["updated_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 81) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 81], ["updated_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 81) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 81], ["updated_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 81) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 81], ["updated_at", Sat, 27 Dec 2014 07:41:10 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:41:14 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 81]]  (2.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 99]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 99]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 100]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 100]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 101]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 101]]  (1.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 102]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 102]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 103]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 103]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 55ms (Views: 32.6ms | ActiveRecord: 18.5ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2014-12-27 08:41:14 +0100 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2014-12-27 08:41:14 +0100 Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2014-12-27 08:41:14 +0100 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2014-12-27 08:41:14 +0100 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2014-12-27 08:41:14 +0100 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2014-12-27 08:41:14 +0100 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2014-12-27 08:41:14 +0100 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2014-12-27 08:41:14 +0100 Started GET "/assets/images/sort_asc.png" for 127.0.0.1 at 2014-12-27 08:41:14 +0100 Started GET "/assets/images/forward_disabled.png" for 127.0.0.1 at 2014-12-27 08:41:14 +0100 Started GET "/assets/images/back_disabled.png" for 127.0.0.1 at 2014-12-27 08:41:14 +0100 Started GET "/assets/images/sort_both.png" for 127.0.0.1 at 2014-12-27 08:41:14 +0100 Started DELETE "/adherent/members/99" for 127.0.0.1 at 2014-12-27 08:41:15 +0100 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"99"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (11.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "99"]]  (0.4ms) BEGIN Adherent::Coord Load (7.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 99]] SQL (0.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 99]]  (247.0ms) COMMIT Redirected to http://127.0.0.1:59382/adherent/members Completed 302 Found in 280ms (ActiveRecord: 267.2ms) Started GET "/adherent/members" for 127.0.0.1 at 2014-12-27 08:41:15 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 81]]  (2.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 100]] Adherent::Coord Load (1.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 100]]  (1.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 101]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 101]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 102]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 102]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 103]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 103]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 49ms (Views: 25.0ms | ActiveRecord: 21.5ms)  (1.6ms) SELECT COUNT(*) FROM "adherent_members"  (2.0ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (2.4ms) select table_name from information_schema.views where table_schema = 'adh_test'  (46.4ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "organisms", "adherent_members", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (0.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.9ms) DELETE FROM "adherent_members" Organism Load (2.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (2.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:16 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:16 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:16 UTC +00:00]]  (2.1ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:16 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:16 UTC +00:00]]  (2.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (1.8ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (3.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:16 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:16 UTC +00:00]]  (2.8ms) COMMIT Adherent::Member Load (1.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.4ms) BEGIN SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:16 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 1], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:16 UTC +00:00]]  (1.3ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2014-12-27 08:41:16 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (1.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 10.1ms | ActiveRecord: 14.0ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2014-12-27 08:41:16 +0100 Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2014-12-27 08:41:16 +0100 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.1ms) BEGIN SQL (7.2ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (142.9ms) COMMIT Redirected to http://127.0.0.1:59382/adherent/members/1/adhesions Completed 302 Found in 162ms (ActiveRecord: 152.3ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2014-12-27 08:41:17 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:59382/adherent/members/1/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 2.5ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2014-12-27 08:41:17 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.7ms | ActiveRecord: 2.8ms) Started GET "/assets/adherent/cal.gif" for 127.0.0.1 at 2014-12-27 08:41:17 +0100  (1.7ms) SELECT COUNT(*) FROM "adherent_adhesions"  (3.4ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (4.3ms) select table_name from information_schema.views where table_schema = 'adh_test'  (169.0ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.9ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) BEGIN SQL (1.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:18 UTC +00:00]]  (2.1ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:18 UTC +00:00]]  (2.4ms) COMMIT Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:18 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:18 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:18 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (1.0ms) BEGIN Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:18 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) BEGIN Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:18 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Sat, 27 Dec 2014 07:41:18 UTC +00:00]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (1.8ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2014-12-27 08:41:18 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 1]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 14.6ms | ActiveRecord: 5.3ms) Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2014-12-27 08:41:18 +0100 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2014-12-27 08:41:18 +0100 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2014-12-27 08:41:18 +0100 Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2014-12-27 08:41:18 +0100 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] SQL (0.5ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (137.3ms) COMMIT Redirected to http://127.0.0.1:59382/adherent/members/1/payments Completed 302 Found in 148ms (ActiveRecord: 140.8ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2014-12-27 08:41:18 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 12ms (Views: 5.4ms | ActiveRecord: 3.8ms)  (2.8ms) SELECT COUNT(*) FROM "adherent_payments"  (2.0ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (4.7ms) select table_name from information_schema.views where table_schema = 'adh_test'  (136.7ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_reglements", "organisms", "adherent_members", "adherent_payments" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL  (0.3ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/1/coord/new" for 127.0.0.1 at 2014-12-27 08:41:19 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Coord Load (1.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 20.7ms | ActiveRecord: 4.3ms) Started POST "/adherent/members/1/coord" for 127.0.0.1 at 2014-12-27 08:41:19 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (0.7ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 27 Dec 2014 07:41:19 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 1], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:41:19 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/1/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 4.2ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2014-12-27 08:41:19 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 84ms (Views: 12.5ms | ActiveRecord: 2.7ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/2/coord/new" for 127.0.0.1 at 2014-12-27 08:41:20 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"2"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Coord Load (1.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 19.5ms | ActiveRecord: 4.0ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/3/coord/new" for 127.0.0.1 at 2014-12-27 08:41:20 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"3"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 18.7ms | ActiveRecord: 2.2ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/3/coord" for 127.0.0.1 at 2014-12-27 08:41:20 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"3"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 3], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/3/adhesions/new Completed 302 Found in 11ms (ActiveRecord: 3.8ms) Started GET "/adherent/members/3/adhesions/new" for 127.0.0.1 at 2014-12-27 08:41:20 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"3"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 3]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 10.7ms | ActiveRecord: 2.5ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.5ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/4/coord/new" for 127.0.0.1 at 2014-12-27 08:41:20 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"4"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 20.0ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/4/coord" for 127.0.0.1 at 2014-12-27 08:41:20 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"4"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 4], ["office", ""], ["tel", ""], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["zip", ""]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/4/adhesions/new Completed 302 Found in 11ms (ActiveRecord: 3.4ms) Started GET "/adherent/members/4/adhesions/new" for 127.0.0.1 at 2014-12-27 08:41:20 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (6.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 10.4ms | ActiveRecord: 3.1ms) Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e77afc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.1ms | ActiveRecord: 2.5ms)  (0.4ms) ROLLBACK  (0.6ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ea5614 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5ea5614%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 2.2ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6050158 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"27/12/2015", "from_date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x606dd8e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x606dd8e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"27/12/2015", "from_date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x6089020 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6089020%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 2.5ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"27/12/2015", "from_date"=>"27/12/2014"}, "member_id"=>"#[RSpec::Mocks::Double:0x60b76e6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 2.1ms | ActiveRecord: 2.3ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x60d31ac @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x60e72a6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x60e72a6%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x6101318 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6101318%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x6118b62 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x61394fc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x617074a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x603635c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.1ms)  (0.8ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 18], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 18], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 5]]  (0.4ms) SAVEPOINT active_record_1 SQL (2.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 5], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/5/payments/new" for 127.0.0.1 at 2014-12-27 08:41:20 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"5"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]] Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.1ms | ActiveRecord: 4.1ms) Started POST "/adherent/members/5/payments" for 127.0.0.1 at 2014-12-27 08:41:20 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"5"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 18]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 5], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 1], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/5/payments Completed 302 Found in 22ms (ActiveRecord: 7.0ms) Started GET "/adherent/members/5/payments" for 127.0.0.1 at 2014-12-27 08:41:20 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"5"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 5]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (1.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 16.7ms | ActiveRecord: 6.4ms) Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 5]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 6]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 6]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 6], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 7]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 7]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 7], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/1/reglements/new" for 127.0.0.1 at 2014-12-27 08:41:20 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 6]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 16.6ms | ActiveRecord: 7.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.5ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 19], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 8]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 8]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 8], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/8/payments/new" for 127.0.0.1 at 2014-12-27 08:41:20 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"8"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]]  (1.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 12.0ms | ActiveRecord: 6.2ms) Started POST "/adherent/members/8/payments" for 127.0.0.1 at 2014-12-27 08:41:20 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"8"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 19]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 8], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 4], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["payment_id", 2], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/8/payments Completed 302 Found in 21ms (ActiveRecord: 6.6ms) Started GET "/adherent/members/8/payments" for 127.0.0.1 at 2014-12-27 08:41:20 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"8"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 8]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 4]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 15.7ms | ActiveRecord: 6.2ms) Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 8]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 9]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 9]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 9], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 10]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 10]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 10], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/2/reglements/new" for 127.0.0.1 at 2014-12-27 08:41:20 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"2"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 10]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 15.8ms | ActiveRecord: 6.8ms) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 20], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 11]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 11], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/11/payments/new" for 127.0.0.1 at 2014-12-27 08:41:20 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"11"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 10.8ms | ActiveRecord: 4.1ms) Started POST "/adherent/members/11/payments" for 127.0.0.1 at 2014-12-27 08:41:20 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"11"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 20]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 11], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 7], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["payment_id", 3], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/11/payments Completed 302 Found in 19ms (ActiveRecord: 6.3ms) Started GET "/adherent/members/11/payments" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"11"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 11]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.4ms | ActiveRecord: 6.2ms) Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 11]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 12]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 12]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 12], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 13]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 13]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 13], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/3/reglements/new" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"3"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 12]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 16.5ms | ActiveRecord: 6.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 21], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 14]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 14]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 14], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/14/payments/new" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"14"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 21]] Adherent::Adhesion Load (2.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 12.0ms | ActiveRecord: 7.5ms) Started POST "/adherent/members/14/payments" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"14"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 21]] SQL (1.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 14], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 10], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["payment_id", 4], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/14/payments Completed 302 Found in 21ms (ActiveRecord: 6.9ms) Started GET "/adherent/members/14/payments" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"14"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 14]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 10]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.5ms | ActiveRecord: 6.9ms) Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 14]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 15]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 15]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 15], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 16]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 16]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 16], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/4/reglements/new" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 16.4ms | ActiveRecord: 6.8ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 22], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 17]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 17]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 17], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/17/payments/new" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"17"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Adhesion Load (2.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 11.0ms | ActiveRecord: 6.4ms) Started POST "/adherent/members/17/payments" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"17"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 17], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] SQL (2.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 13], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["payment_id", 5], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/17/payments Completed 302 Found in 24ms (ActiveRecord: 8.5ms) Started GET "/adherent/members/17/payments" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"17"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Payment Load (1.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 17]] Adherent::Reglement Load (1.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (1.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (1.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (18.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 19.1ms | ActiveRecord: 9.5ms) Adherent::Payment Load (1.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 17]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 18]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 18]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 18], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 19]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 19]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 19], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/5/reglements/new" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"5"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 18]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 16.8ms | ActiveRecord: 6.7ms) Started POST "/adherent/payments/5/reglements" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"14"}, "commit"=>"Enregistrer", "payment_id"=>"5"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 14], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["payment_id", 5], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Redirected to http://www.example.com/adherent/members/17/payments Completed 302 Found in 14ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/17/payments" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"17"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 17]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.7ms | ActiveRecord: 6.9ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 23], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 20]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 20]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 20], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/20/payments/new" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"20"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "20"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 20]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 10.7ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/20/payments" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"20"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "20"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 23]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 20], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 20]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 16], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["payment_id", 6], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/20/payments Completed 302 Found in 19ms (ActiveRecord: 5.6ms) Started GET "/adherent/members/20/payments" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"20"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "20"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 20]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.4ms | ActiveRecord: 4.7ms) Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 20]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 21]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 21]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 21], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 22]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 22]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 22], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/6/reglements/new" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"6"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "6"]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 21]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 16.5ms | ActiveRecord: 6.5ms) Started POST "/adherent/payments/6/reglements" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"17"}, "commit"=>"Enregistrer", "payment_id"=>"6"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "6"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 17], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["payment_id", 6], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Redirected to http://www.example.com/adherent/members/20/payments Completed 302 Found in 14ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/20/payments" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"20"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "20"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 20]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 21]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 16.7ms | ActiveRecord: 5.5ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 21]]  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 24], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 23]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 23]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 23], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/23/payments/new" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"23"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 24]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 23]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.1ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/23/payments" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"23"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 24]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 23], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 23]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 19], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/23/payments Completed 302 Found in 20ms (ActiveRecord: 6.9ms) Started GET "/adherent/members/23/payments" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"23"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 23]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.3ms | ActiveRecord: 5.6ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 23]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 24]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 24]]  (0.9ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 24], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 25]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 25]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 25], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/7/reglements/new" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"7"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 17.5ms | ActiveRecord: 6.3ms) Started POST "/adherent/payments/7/reglements" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"20"}, "commit"=>"Enregistrer", "payment_id"=>"7"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "20"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 20], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Redirected to http://www.example.com/adherent/members/23/payments Completed 302 Found in 16ms (ActiveRecord: 5.7ms) Started GET "/adherent/members/23/payments" for 127.0.0.1 at 2014-12-27 08:41:21 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"23"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 23]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 15.8ms | ActiveRecord: 5.9ms) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 24]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]]  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 25], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 26]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 26]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 26], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/26/payments/new" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"26"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.6ms | ActiveRecord: 3.9ms) Started POST "/adherent/members/26/payments" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"26"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 25]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 26], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 22], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/26/payments Completed 302 Found in 20ms (ActiveRecord: 5.6ms) Started GET "/adherent/members/26/payments" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"26"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 26]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.7ms | ActiveRecord: 4.6ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 26]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 27]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 27]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 27], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 28]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 28]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 28], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/8/reglements/new" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"8"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 28]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 16.2ms | ActiveRecord: 6.9ms) Started POST "/adherent/payments/8/reglements" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"23"}, "commit"=>"Enregistrer", "payment_id"=>"8"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "23"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 23], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Redirected to http://www.example.com/adherent/members/26/payments Completed 302 Found in 14ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/26/payments" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"26"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 26]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (1.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 14.9ms | ActiveRecord: 7.1ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 26], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 29]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 29]]  (0.7ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 29], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/29/payments/new" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"29"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 29]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 12.6ms | ActiveRecord: 4.0ms) Started POST "/adherent/members/29/payments" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"29"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]]  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 26]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 29], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 29]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 25], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/29/payments Completed 302 Found in 20ms (ActiveRecord: 6.4ms) Started GET "/adherent/members/29/payments" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"29"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 29]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.0ms | ActiveRecord: 5.4ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 29]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 30]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 30]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 30], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 31]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 31]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 31], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/9/reglements/new" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"9"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 30]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 31]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 17.5ms | ActiveRecord: 5.9ms) Started POST "/adherent/payments/9/reglements" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"26"}, "commit"=>"Enregistrer", "payment_id"=>"9"} Organism Load (2.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 26], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Redirected to http://www.example.com/adherent/members/29/payments Completed 302 Found in 19ms (ActiveRecord: 7.9ms) Started GET "/adherent/members/29/payments" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"29"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 29]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.0ms | ActiveRecord: 6.4ms) Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 27], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 32]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 32]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 32], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 32]] Started GET "/adherent/members/32/payments/new" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"32"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 32]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.8ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/32/payments" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"32"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 27]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 32], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 32]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 28], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/32/payments Completed 302 Found in 19ms (ActiveRecord: 5.9ms) Started GET "/adherent/members/32/payments" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"32"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 32]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.9ms | ActiveRecord: 4.8ms)  (1.1ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 32]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 28], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 35]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 35]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 35], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/35/payments/new" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"35"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 35]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 10.7ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/35/payments" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"35"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 28]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 35], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 35]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 29], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/35/payments Completed 302 Found in 19ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/35/payments" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"35"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 35]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.0ms | ActiveRecord: 5.0ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 29], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 29], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 38]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 38]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 38], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/38/payments/new" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"38"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 38]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 96ms (Views: 11.9ms | ActiveRecord: 3.2ms) Started POST "/adherent/members/38/payments" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"38"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 38], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 38]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 30], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["payment_id", 12], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/38/payments Completed 302 Found in 19ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/38/payments" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"38"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 38]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Reglement Load (1.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.5ms | ActiveRecord: 4.3ms)  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 38]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 30], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 30], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 41]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 41]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 41], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/41/payments/new" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"41"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 41]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.3ms | ActiveRecord: 3.7ms) Started POST "/adherent/members/41/payments" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"41"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 30]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 41], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 41]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 31], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00], ["payment_id", 13], ["updated_at", Sat, 27 Dec 2014 07:41:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/41/payments Completed 302 Found in 18ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/41/payments" for 127.0.0.1 at 2014-12-27 08:41:22 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"41"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Payment Load (1.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 41]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.6ms | ActiveRecord: 4.3ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 41]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 31], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 44]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 44]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 44], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/44/payments/new" for 127.0.0.1 at 2014-12-27 08:41:23 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"44"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "44"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.4ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/44/payments" for 127.0.0.1 at 2014-12-27 08:41:23 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"44"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "44"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 44]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 31]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 44], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 32], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["payment_id", 14], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/44/payments Completed 302 Found in 20ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/44/payments" for 127.0.0.1 at 2014-12-27 08:41:23 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"44"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "44"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 44]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 44]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 44]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.6ms | ActiveRecord: 5.3ms)  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 32], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]]  (1.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 47]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 47]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 47], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/47/payments/new" for 127.0.0.1 at 2014-12-27 08:41:23 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"47"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 47]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.7ms | ActiveRecord: 3.5ms) Started POST "/adherent/members/47/payments" for 127.0.0.1 at 2014-12-27 08:41:23 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"47"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 47]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 32]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 47], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 47]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 33], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["payment_id", 15], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/47/payments Completed 302 Found in 20ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/47/payments" for 127.0.0.1 at 2014-12-27 08:41:23 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"47"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 47]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 47]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 47]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.0ms | ActiveRecord: 5.6ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 47]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 33], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 50]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 50]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["from_date", Sat, 27 Dec 2014], ["member_id", 50], ["to_date", Sat, 26 Dec 2015], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/50/payments/new" for 127.0.0.1 at 2014-12-27 08:41:23 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"50"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "50"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 50]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.0ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/50/payments" for 127.0.0.1 at 2014-12-27 08:41:23 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"27/12/2014", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"50"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "50"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 50]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 33]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["date", Sat, 27 Dec 2014], ["member_id", 50], ["mode", "CB"], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 50]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 34], ["amount", #], ["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["payment_id", 16], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/50/payments Completed 302 Found in 18ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/50/payments" for 127.0.0.1 at 2014-12-27 08:41:23 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"50"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "50"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 50]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 50]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 50]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 20ms (Views: 13.4ms | ActiveRecord: 4.1ms)  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 50]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["member_id", 53], ["updated_at", Sat, 27 Dec 2014 07:41:23 UTC +00:00], ["zip", 59000]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 53]]  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 4]] SQL (0.5ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 53]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.8ms) ROLLBACK SQL (43.7ms) DELETE FROM "adherent_members" Organism Load (29.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.4ms) BEGIN SQL (86.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:05 UTC +00:00]]  (3.3ms) COMMIT Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.7ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (22.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Sat, 21 Mar 2015 07:45:05 UTC +00:00]]  (2.2ms) COMMIT Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 34], ["updated_at", Sat, 21 Mar 2015 07:45:06 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 34], ["updated_at", Sat, 21 Mar 2015 07:45:06 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 34], ["updated_at", Sat, 21 Mar 2015 07:45:06 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 34], ["updated_at", Sat, 21 Mar 2015 07:45:06 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:45:11 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 34]]  (57.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 54]] Adherent::Coord Load (15.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 54]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 55]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 55]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 56]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 56]]  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 57]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 57]]  (2.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 58]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 58]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (166.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.3ms) Completed 200 OK in 284ms (Views: 165.3ms | ActiveRecord: 97.8ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-03-21 08:45:11 +0100 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-03-21 08:45:11 +0100 Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-03-21 08:45:15 +0100 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-03-21 08:45:15 +0100 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-03-21 08:45:15 +0100 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-03-21 08:45:15 +0100 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-03-21 08:45:15 +0100 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-03-21 08:45:15 +0100 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-03-21 08:45:15 +0100 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-03-21 08:45:15 +0100 Started GET "/assets/back_disabled.png" for 127.0.0.1 at 2015-03-21 08:45:15 +0100 Started GET "/assets/forward_disabled.png" for 127.0.0.1 at 2015-03-21 08:45:15 +0100 Started DELETE "/adherent/members/54" for 127.0.0.1 at 2015-03-21 08:45:16 +0100 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"54"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (3.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "54"]]  (0.2ms) BEGIN Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 54]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 54]] SQL (0.5ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 54]]  (58.6ms) COMMIT Redirected to http://127.0.0.1:37704/adherent/members Completed 302 Found in 75ms (ActiveRecord: 64.5ms) Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:45:16 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 34]]  (2.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 55]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 55]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 56]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 56]]  (1.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 57]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 57]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 58]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 58]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (38.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 51ms (Views: 28.9ms | ActiveRecord: 18.3ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_members"  (18.1ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (124.3ms) select table_name from information_schema.views where table_schema = 'adh_test'  (765.5ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "organisms", "adherent_members", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (1.5ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (2.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:18 UTC +00:00]]  (102.7ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00]]  (0.9ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.7ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (1.5ms) select table_name from information_schema.views where table_schema = 'adh_test'  (94.4ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.6ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.7ms) BEGIN SQL (2.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:19 UTC +00:00]]  (1.4ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-03-21 08:45:19 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (16.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 18.5ms | ActiveRecord: 5.3ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-03-21 08:45:19 +0100 Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2015-03-21 08:45:20 +0100 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (2.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (7.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.3ms) BEGIN SQL (1.0ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (109.0ms) COMMIT Redirected to http://127.0.0.1:37704/adherent/members/1/adhesions Completed 302 Found in 134ms (ActiveRecord: 124.6ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-03-21 08:45:20 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:37704/adherent/members/1/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.6ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2015-03-21 08:45:20 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (32.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (34.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 48ms (Views: 38.7ms | ActiveRecord: 4.9ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-03-21 08:45:20 +0100  (2.3ms) SELECT COUNT(*) FROM "adherent_adhesions"  (2.7ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (3.4ms) select table_name from information_schema.views where table_schema = 'adh_test'  (267.1ms) TRUNCATE TABLE "adherent_coords", "adherent_adhesions", "adherent_reglements", "organisms", "adherent_members", "adherent_payments" RESTART IDENTITY CASCADE;  (1.3ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL  (0.1ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5559a6a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (0.7ms) Completed 200 OK in 10ms (Views: 3.8ms | ActiveRecord: 2.2ms)  (0.6ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ce9672 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d2cf12 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5d2cf12%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d6e034 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.5ms | ActiveRecord: 1.7ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5da3a4a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5da3a4a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ddd394 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x5de13b8 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:21 UTC +00:00]]  (1.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.8ms | ActiveRecord: 2.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e08b7a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e2cee4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 3.0ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e4cc3a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e6d638 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5e6d638%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e8e81a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.2ms | ActiveRecord: 2.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ead9fe @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ec438e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ee14c0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5ee14c0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 7ms (ActiveRecord: 2.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5f08e58 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5f245d6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5f426f8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5f426f8%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5f805b6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.9ms) ROLLBACK  (0.5ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (2.6ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (1.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 1], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 2], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.9ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 3], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 4], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 5], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 6], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]]  (0.4ms) SAVEPOINT active_record_1 SQL (2.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 7], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 8], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 9], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.7ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["member_id", 7], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["zip", 59000]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 7]]  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 1]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 7]] SQL (0.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 7]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x..fdaf9dfe4 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.6ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x..fdafafa8c @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x..fdafba89c @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x..fdafba8c4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.6ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 11]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 11], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 11]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 12]] Adherent::Adhesion Load (2.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 12]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 12], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 12]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 12]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 13]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 13]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 13], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 13]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 13]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/14/coord/new" for 127.0.0.1 at 2015-03-21 08:45:22 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"14"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (92.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 104ms (Views: 98.8ms | ActiveRecord: 1.5ms)  (1.4ms) ROLLBACK  (0.8ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Sat, 21 Mar 2015 07:45:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/15/coord/new" for 127.0.0.1 at 2015-03-21 08:45:22 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"15"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 20.8ms | ActiveRecord: 3.8ms) Started POST "/adherent/members/15/coord" for 127.0.0.1 at 2015-03-21 08:45:22 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"15"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 15]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 15], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/15/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 3.2ms) Started GET "/adherent/members/15/adhesions/new" for 127.0.0.1 at 2015-03-21 08:45:23 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"15"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 15]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.5ms | ActiveRecord: 1.9ms) Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 15]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 27], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/16/coord/new" for 127.0.0.1 at 2015-03-21 08:45:23 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"16"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Coord Load (1.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 20.4ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/16/coord" for 127.0.0.1 at 2015-03-21 08:45:23 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"16"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 16]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 16], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["zip", ""]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/16/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 3.3ms) Started GET "/adherent/members/16/adhesions/new" for 127.0.0.1 at 2015-03-21 08:45:23 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"16"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 16]] Adherent::Adhesion Load (1.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.1ms | ActiveRecord: 3.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/17/coord/new" for 127.0.0.1 at 2015-03-21 08:45:23 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"17"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 19.8ms | ActiveRecord: 2.0ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/17/coord" for 127.0.0.1 at 2015-03-21 08:45:23 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"17"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 17]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 17], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["zip", ""]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/17/adhesions/new Completed 302 Found in 11ms (ActiveRecord: 3.7ms) Started GET "/adherent/members/17/adhesions/new" for 127.0.0.1 at 2015-03-21 08:45:23 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"17"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 17]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.0ms | ActiveRecord: 1.9ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.7ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.8ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 30], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/18/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (2.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (1.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 31], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/19/coord/new Completed 302 Found in 14ms (ActiveRecord: 6.6ms)  (1.0ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 32], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/20/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"21"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/21 Completed 302 Found in 7ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"22"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (2.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.7ms | ActiveRecord: 3.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"23"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/23 Completed 302 Found in 6ms (ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"24"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 24 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 24 [["name", "Dalton"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/24 Completed 302 Found in 13ms (ActiveRecord: 3.7ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.1ms | ActiveRecord: 3.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x..fdafecd42 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x..fdaff9ab0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 76ms (ActiveRecord: 1.7ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5c86108 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.4ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5cddc00 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d1dc42 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5d1dc42%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d670a4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5da70dc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5da70dc%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 2.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5de03d2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e05308 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e20540 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5e20540%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e3ee96 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5e3ee96%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e63fac @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e8233a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ea13ac @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5ea13ac%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ec1c06 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.3ms | ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 59], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/25/adhesions/new" for 127.0.0.1 at 2015-03-21 08:45:23 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"25"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "25"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 25]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.2ms | ActiveRecord: 2.4ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 60], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/26/adhesions/new" for 127.0.0.1 at 2015-03-21 08:45:23 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"26"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 26]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 26]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.4ms | ActiveRecord: 1.8ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 26]] Started POST "/adherent/members/26/adhesions" for 127.0.0.1 at 2015-03-21 08:45:23 +0100 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"26"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 26], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/26/adhesions Completed 302 Found in 9ms (ActiveRecord: 2.3ms) Started GET "/adherent/members/26/adhesions" for 127.0.0.1 at 2015-03-21 08:45:23 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"26"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 26]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 26]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 7.7ms | ActiveRecord: 3.0ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 26]] SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 61], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 27], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/27/adhesions" for 127.0.0.1 at 2015-03-21 08:45:23 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"27"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "27"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 27]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 27]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 7.9ms | ActiveRecord: 2.7ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 62], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 28], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/28/adhesions" for 127.0.0.1 at 2015-03-21 08:45:23 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"28"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "28"]] Adherent::Adhesion Exists (1.1ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 28]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 28]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 7.9ms | ActiveRecord: 3.0ms) Started GET "/adherent/members/28/adhesions/15/edit" for 127.0.0.1 at 2015-03-21 08:45:23 +0100 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"28", "id"=>"15"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "28"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 28], ["id", "15"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.9ms | ActiveRecord: 1.9ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 63], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 29], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 07:45:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/29/adhesions" for 127.0.0.1 at 2015-03-21 08:45:23 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"29"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 29]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 29]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 7.6ms | ActiveRecord: 2.8ms) Started GET "/adherent/members/29/payments/new" for 127.0.0.1 at 2015-03-21 08:45:23 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"29"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 63]] Adherent::Adhesion Load (2.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 29]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.7ms) Completed 500 Internal Server Error in 27ms SQL (0.8ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 64], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 30]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 30]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 30], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/30/payments/new" for 127.0.0.1 at 2015-03-21 08:45:24 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"30"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "30"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 64]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 30]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.2ms) Completed 500 Internal Server Error in 17ms SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 65], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 31]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 31]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 31], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/31/payments/new" for 127.0.0.1 at 2015-03-21 08:45:24 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"31"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 65]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.2ms) Completed 500 Internal Server Error in 18ms SQL (1.1ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (4.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 66], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 32]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 32]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 32], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/32/payments/new" for 127.0.0.1 at 2015-03-21 08:45:24 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"32"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 66]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (81.5ms) Completed 500 Internal Server Error in 91ms SQL (0.4ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 67], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 33]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 33]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 33], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/33/payments/new" for 127.0.0.1 at 2015-03-21 08:45:24 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"33"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "33"]] Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 67]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 33]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.6ms) Completed 500 Internal Server Error in 20ms SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 68], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 34]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 34]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 34], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 69], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 35]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 35]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 35], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 70], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 36]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 36]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 36], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 71], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 37]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 37]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 37], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 72) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 72) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 72], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 38]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 38]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 38], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.7ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.8ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 73) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 73) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 73], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 39], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 39]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 39]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 39], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 74) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 74) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 74], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 40], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 40]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 40]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 40], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.9ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 75) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 75) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 75], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 41], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 41]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 41]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 41], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 76) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 76) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 76], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 42], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 42]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 42]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 42], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 77) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 77) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 77], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 43], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 43]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 43]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 43], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 78) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 78) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 78], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 78) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 78) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 78], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 78) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 78) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 78], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 44]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 44]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 44], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 44]] Started GET "/adherent/members/44/payments/new" for 127.0.0.1 at 2015-03-21 08:45:24 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"44"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "44"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 78]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.0ms) Completed 500 Internal Server Error in 23ms  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 79) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 79) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 79], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 79) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 79) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 79], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 79) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 79) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 79], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 47]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 47]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 47], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/47/payments/new" for 127.0.0.1 at 2015-03-21 08:45:24 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"47"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 79]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 47]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.4ms) Completed 500 Internal Server Error in 18ms  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 80) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 80) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 80], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 80) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 80) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 80], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 80) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 80) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 80], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 50]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 50]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 50], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/50/payments/new" for 127.0.0.1 at 2015-03-21 08:45:24 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"50"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "50"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 80]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 50]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.7ms) Completed 500 Internal Server Error in 16ms  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 81) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 81], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 81) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 81], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 81) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 81], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 53]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 53]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 53], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/53/payments/new" for 127.0.0.1 at 2015-03-21 08:45:24 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"53"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "53"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 81]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 53]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.7ms) Completed 500 Internal Server Error in 16ms  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.0ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 82) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 82) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 82], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 82) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 82) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 82], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 82) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 82) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 82], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 56]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 56]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 56], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/56/payments/new" for 127.0.0.1 at 2015-03-21 08:45:24 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"56"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "56"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 82]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 56]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 40]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.5ms) Completed 500 Internal Server Error in 17ms  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 83) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 83) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 83], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 83) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 83) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 83], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 83) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 83) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 83], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 59]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 59]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 59], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/59/payments/new" for 127.0.0.1 at 2015-03-21 08:45:24 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"59"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "59"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 83]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 59]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 41]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.2ms) Completed 500 Internal Server Error in 17ms  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 84) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 84) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 84], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 84) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 84) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 84], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 84) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 84) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 84], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 62]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 62]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 62], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/62/payments/new" for 127.0.0.1 at 2015-03-21 08:45:24 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"62"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "62"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 84]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 62]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 42]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.1ms) Completed 500 Internal Server Error in 17ms  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 85) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 85) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 85], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 85) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 85) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 85], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 85) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 85) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 85], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 65]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 65]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 65], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/65/payments/new" for 127.0.0.1 at 2015-03-21 08:45:25 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"65"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "65"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 85]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 65]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 43]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.0ms) Completed 500 Internal Server Error in 16ms  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 86) LIMIT 1  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 86) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 86], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 86) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 86) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 86], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 86) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 86) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 86], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 68]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 68]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 68], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/68/payments/new" for 127.0.0.1 at 2015-03-21 08:45:25 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"68"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 86]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 68]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 44]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.4ms) Completed 500 Internal Server Error in 16ms  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 87) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 87], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 87) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 87], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 87) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 87], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 71]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 71]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 71], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/71/payments/new" for 127.0.0.1 at 2015-03-21 08:45:25 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"71"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 87]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 71]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.2ms) Completed 500 Internal Server Error in 92ms  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 88], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 88], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 88], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 74]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 74]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 74], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/74/payments/new" for 127.0.0.1 at 2015-03-21 08:45:25 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"74"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "74"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 88]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 74]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.3ms) Completed 500 Internal Server Error in 16ms  (0.3ms) ROLLBACK  (0.6ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 89) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 89) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 89], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 89) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 89) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 89], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 89) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 89) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 89], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 77]] Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 77]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 77], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/77/payments/new" for 127.0.0.1 at 2015-03-21 08:45:25 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"77"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "77"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 89]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 77]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 47]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.1ms) Completed 500 Internal Server Error in 16ms  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 90) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 90) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 90], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 90) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 90) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 90], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 90) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 90) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 90], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 80]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 80]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 80], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/80/payments/new" for 127.0.0.1 at 2015-03-21 08:45:25 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"80"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "80"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 90]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 80]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (7.0ms) Completed 500 Internal Server Error in 18ms  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 91) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 91) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 91], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 91) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 91) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 91], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 91) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 91) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 91], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 83]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 83]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 83], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/83/payments/new" for 127.0.0.1 at 2015-03-21 08:45:25 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"83"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "83"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 91]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 83]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 49]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.3ms) Completed 500 Internal Server Error in 17ms  (0.3ms) ROLLBACK  (0.6ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 92) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 92) LIMIT 1 SQL (2.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 92], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 92) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 92) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 92], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 92) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 92) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 92], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 86]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 86]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 86], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/86/payments/new" for 127.0.0.1 at 2015-03-21 08:45:25 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"86"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "86"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 92]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 86]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 50]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (6.5ms) Completed 500 Internal Server Error in 17ms  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 93], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 93], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 93], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 89]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 89]]  (0.8ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 89], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/89/payments/new" for 127.0.0.1 at 2015-03-21 08:45:25 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"89"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "89"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 93]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 89]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 51]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (5.7ms) Completed 500 Internal Server Error in 16ms  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 2.6ms | ActiveRecord: 2.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 95], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 95], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 95], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 95], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 95], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:45:25 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 95]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 92]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 92]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 93]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 93]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 94]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 94]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 95]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 95]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 96]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 96]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.9ms) Completed 200 OK in 43ms (Views: 36.0ms | ActiveRecord: 5.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 96], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 96], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 96], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 96], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 96], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:45:25 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 96]]  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 98]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 98]]  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 97]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 97]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 99]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 99]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 100]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 100]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 101]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 101]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 24.7ms | ActiveRecord: 6.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 97], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 97], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 97], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 97], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 97], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:45:25 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 97]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 102]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 102]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 103]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 103]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 104]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 104]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 105]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 105]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 106]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 106]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 24.2ms | ActiveRecord: 8.6ms) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/102/adhesions" for 127.0.0.1 at 2015-03-21 08:45:25 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"102"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "102"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 102]] Redirected to http://www.example.com/adherent/members/102/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.3ms) Started GET "/adherent/members/102/adhesions/new" for 127.0.0.1 at 2015-03-21 08:45:25 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"102"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "102"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 102]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 102]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 15.8ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (3.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 98], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 98], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 98], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 98], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 98], ["updated_at", Sat, 21 Mar 2015 07:45:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:45:25 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 98]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 107]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 107]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 108]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 108]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 109]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 109]]  (1.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 110]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 110]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 111]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 111]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (4.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 110ms (Views: 99.8ms | ActiveRecord: 8.3ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/107/payments" for 127.0.0.1 at 2015-03-21 08:45:25 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"107"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "107"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 107]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 12ms (Views: 8.1ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 99], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 99], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 99], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 99], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 99], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:45:26 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 99]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 112]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 112]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 113]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 113]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 114]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 114]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 115]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 115]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 116]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 116]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 25.0ms | ActiveRecord: 5.3ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/112/edit" for 127.0.0.1 at 2015-03-21 08:45:26 +0100 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"112"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "112"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 16.3ms | ActiveRecord: 1.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.7ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 100], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 100], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 100], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 100) LIMIT 1  (1.0ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 100], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 100], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:45:26 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 100]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 117]] Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 117]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 118]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 118]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 119]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 119]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 120]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 120]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 121]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 121]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 24.4ms | ActiveRecord: 5.9ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/117/coord" for 127.0.0.1 at 2015-03-21 08:45:26 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"117"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 117]] Redirected to http://www.example.com/adherent/members/117/coord/new Completed 302 Found in 5ms (ActiveRecord: 1.5ms) Started GET "/adherent/members/117/coord/new" for 127.0.0.1 at 2015-03-21 08:45:26 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"117"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 117]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 21.7ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 101], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 101], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 101], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 101], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 101], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:45:26 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 101]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 122]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 122]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 123]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 123]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 124]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 124]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 125]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 125]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 126]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 126]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 25.1ms | ActiveRecord: 7.9ms) Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 122]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 122]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 122], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/122/adhesions" for 127.0.0.1 at 2015-03-21 08:45:26 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"122"} Organism Load (2.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "122"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 122]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 122]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 52]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 52]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.4ms | ActiveRecord: 4.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 102], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 102], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 102], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 102], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 102], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:45:26 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 102]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 127]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 127]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 128]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 128]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 129]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 129]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 130]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 130]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 131]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 131]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 24.5ms | ActiveRecord: 5.8ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2015-03-21 08:45:26 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 14.5ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 103], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 103], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 103], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 103], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 103], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:45:26 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 103]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 132]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 132]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 133]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 133]]  (1.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 134]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 134]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 135]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 135]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 136]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 136]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 22.1ms | ActiveRecord: 6.8ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["member_id", 132], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 132]] Started GET "/adherent/members/132/coord" for 127.0.0.1 at 2015-03-21 08:45:26 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"132"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 132]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 10ms (Views: 6.1ms | ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 104) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 104) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 104], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 104) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 104) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 104], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 104) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 104) LIMIT 1 SQL (1.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 104], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 104) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 104) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 104], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 104) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 104) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 104], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2015-03-21 08:45:26 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 13.7ms | ActiveRecord: 0.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2015-03-21 08:45:26 +0100 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 104) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 104], ["updated_at", Sat, 21 Mar 2015 07:45:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/142/coord/new Completed 302 Found in 11ms (ActiveRecord: 2.9ms) Started GET "/adherent/members/142/coord/new" for 127.0.0.1 at 2015-03-21 08:45:26 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"142"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "142"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 142]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 19.4ms | ActiveRecord: 1.4ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_members"  (0.3ms) ROLLBACK ActiveRecord::SchemaMigration Load (56.5ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateAdherentMembers (20130805145522)  (0.8ms) BEGIN  (413.9ms) CREATE TABLE "adherent_members" ("id" serial primary key, "number" character varying(255), "name" character varying(255), "forname" character varying(255), "birthdate" date, "created_at" timestamp, "updated_at" timestamp)  PG::DuplicateTable: ERREUR: la relation « adherent_members » existe déjà : CREATE TABLE "adherent_members" ("id" serial primary key, "number" character varying(255), "name" character varying(255), "forname" character varying(255), "birthdate" date, "created_at" timestamp, "updated_at" timestamp)  (5.1ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["member_id", 1], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["zip", 59000]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 1]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] SQL (0.9ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x640fa78 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (0.3ms) Completed 200 OK in 34ms (Views: 8.2ms | ActiveRecord: 5.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x64c3884 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x64db63c @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.8ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x64db66e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 2.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x59f5a56 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 3.2ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5c1f368 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5c1f368%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d3543c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5d3543c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ff4c0e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x5ffaf3c @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.9ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62a57dc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.8ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6389504 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x639e6b6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.9ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.7ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (1.8ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 5]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 5], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 5]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 6]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 6]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 6], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 6]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 6]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 7]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 7]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 7], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 7]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 7]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 11], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 11], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 11], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 11], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 11], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:49:53 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 11]]  (2.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 8]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 9]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 9]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 10]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 10]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 11]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 12]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 12]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.6ms) Completed 200 OK in 56ms (Views: 44.4ms | ActiveRecord: 8.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 12], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 12], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 12], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 12], ["updated_at", Sat, 21 Mar 2015 07:49:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 12], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 12]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 13]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 13]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 14]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 15]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 15]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 16]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 16]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 25.2ms | ActiveRecord: 5.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 13], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 13], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 13], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 13], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 13], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 13]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 18]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 18]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 19]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 19]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 20]] Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 20]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 21]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 21]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 22]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 23.1ms | ActiveRecord: 5.9ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/18/edit" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"18"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "18"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (30.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39ms (Views: 35.5ms | ActiveRecord: 1.3ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 14]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 23]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 23]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 24]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 24]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 25]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 25]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 26]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 27]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 25.3ms | ActiveRecord: 5.4ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/23/payments" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"23"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 23]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 8.8ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.5ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 15]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 28]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 28]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 29]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 29]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 30]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 30]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 31]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 31]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 32]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 23.0ms | ActiveRecord: 5.5ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/28/adhesions" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"28"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "28"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 28]] Redirected to http://www.example.com/adherent/members/28/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.8ms) Started GET "/adherent/members/28/adhesions/new" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"28"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "28"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 28]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 28]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 15.5ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 16], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 16], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 16], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 16], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 16], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 16]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 33]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 33]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 34]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 34]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 35]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 35]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 36]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 36]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 37]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 24.8ms | ActiveRecord: 5.5ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (9.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 13.0ms | ActiveRecord: 0.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 17], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 17], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 17], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 17], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 17], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 17]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 38]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 38]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 39]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 39]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 40]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 40]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 41]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 41]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 42]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 42]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 96ms (Views: 88.8ms | ActiveRecord: 5.7ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 38]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 38]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 38], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/38/adhesions" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"38"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 38]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 38]]  (1.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.0ms | ActiveRecord: 3.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 18], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 18], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 18], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 18], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 18]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 43]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 43]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 44]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 45]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 45]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 46]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 46]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 47]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 47]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 24.1ms | ActiveRecord: 5.1ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/43/coord" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"43"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "43"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 43]] Redirected to http://www.example.com/adherent/members/43/coord/new Completed 302 Found in 5ms (ActiveRecord: 1.5ms) Started GET "/adherent/members/43/coord/new" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"43"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "43"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 43]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 28ms (Views: 23.8ms | ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 19]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 48]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 48]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 49]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 49]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 50]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 50]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 51]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 51]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 52]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 52]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 23.3ms | ActiveRecord: 5.2ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["member_id", 48], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 48]] Started GET "/adherent/members/48/coord" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"48"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "48"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 48]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 10ms (Views: 6.2ms | ActiveRecord: 1.2ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 12.0ms | ActiveRecord: 0.6ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 07:49:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/58/coord/new Completed 302 Found in 10ms (ActiveRecord: 2.1ms) Started GET "/adherent/members/58/coord/new" for 127.0.0.1 at 2015-03-21 08:49:54 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"58"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "58"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 58]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 18.9ms | ActiveRecord: 1.2ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_members"  (0.4ms) ROLLBACK SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:49:55 UTC +00:00]]  (105.2ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 07:49:55 UTC +00:00]]  (6.7ms) COMMIT Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 07:49:55 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 07:49:55 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 07:49:55 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:49:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 07:49:55 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) BEGIN Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 59]] Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 21]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:49:55 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 59], ["mode", "Chèque"], ["updated_at", Sat, 21 Mar 2015 07:49:55 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 59]]  (1.6ms) COMMIT Started GET "/adherent/members/59/payments/1" for 127.0.0.1 at 2015-03-21 08:49:59 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"59", "id"=>"1"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "59"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 59]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 59]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (17.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 141ms (Views: 113.7ms | ActiveRecord: 16.2ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-03-21 08:50:00 +0100 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-03-21 08:50:00 +0100 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-03-21 08:50:00 +0100 Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-03-21 08:50:00 +0100 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-03-21 08:50:00 +0100 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-03-21 08:50:00 +0100 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-03-21 08:50:00 +0100 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-03-21 08:50:00 +0100 Started DELETE "/adherent/members/59/payments/1" for 127.0.0.1 at 2015-03-21 08:50:01 +0100 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"59", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "59"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 59], ["id", "1"]]  (0.2ms) BEGIN Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] SQL (0.7ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (216.2ms) COMMIT Redirected to http://127.0.0.1:33547/adherent/members/59/payments Completed 302 Found in 231ms (ActiveRecord: 219.4ms) Started GET "/adherent/members/59/payments" for 127.0.0.1 at 2015-03-21 08:50:01 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"59"} Organism Load (2.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "59"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 59]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 4.8ms | ActiveRecord: 14.8ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-03-21 08:50:01 +0100  (1.8ms) SELECT COUNT(*) FROM "adherent_payments"  (1.4ms) ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL  (3.5ms) select table_name from information_schema.views where table_schema = 'adh_test'  (125.8ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.6ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:02 UTC +00:00]]  (100.2ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:50:02 UTC +00:00]]  (2.1ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:50:02 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:50:02 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:50:02 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:50:02 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:50:02 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (2.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 42ms (Views: 28.8ms | ActiveRecord: 12.1ms) Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-03-21 08:50:02 +0100 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-03-21 08:50:02 +0100 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-03-21 08:50:02 +0100 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-03-21 08:50:02 +0100 Started GET "/assets/forward_disabled.png" for 127.0.0.1 at 2015-03-21 08:50:02 +0100 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-03-21 08:50:02 +0100 Started GET "/assets/back_disabled.png" for 127.0.0.1 at 2015-03-21 08:50:02 +0100 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2015-03-21 08:50:03 +0100 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.1ms) BEGIN Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] SQL (0.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (63.9ms) COMMIT Redirected to http://127.0.0.1:33547/adherent/members Completed 302 Found in 77ms (ActiveRecord: 67.4ms) Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 08:50:03 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 36ms (Views: 28.2ms | ActiveRecord: 5.4ms)  (1.8ms) SELECT COUNT(*) FROM "adherent_members"  (1.7ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (3.5ms) select table_name from information_schema.views where table_schema = 'adh_test'  (222.2ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (1.0ms) ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:05 UTC +00:00]]  (109.1ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:50:05 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:50:05 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:50:05 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:50:05 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:50:05 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.1ms) BEGIN SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:05 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:05 UTC +00:00]]  (1.3ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-03-21 08:50:05 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 83ms (Views: 75.8ms | ActiveRecord: 3.6ms) Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2015-03-21 08:50:06 +0100 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (8.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN SQL (1.3ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (159.6ms) COMMIT Redirected to http://127.0.0.1:33547/adherent/members/1/adhesions Completed 302 Found in 181ms (ActiveRecord: 171.8ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-03-21 08:50:06 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:33547/adherent/members/1/adhesions/new Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2015-03-21 08:50:06 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.7ms | ActiveRecord: 2.4ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-03-21 08:50:06 +0100  (0.9ms) SELECT COUNT(*) FROM "adherent_adhesions"  (0.9ms) ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (1.6ms) select table_name from information_schema.views where table_schema = 'adh_test'  (143.3ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (2.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2015-03-21 08:50:07 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (2.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 14.6ms | ActiveRecord: 4.3ms) SQL (1.7ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/2/adhesions/new" for 127.0.0.1 at 2015-03-21 08:50:07 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"2"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 2]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.2ms | ActiveRecord: 2.0ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 2]] Started POST "/adherent/members/2/adhesions" for 127.0.0.1 at 2015-03-21 08:50:07 +0100 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"2"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 2], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/2/adhesions Completed 302 Found in 11ms (ActiveRecord: 2.7ms) Started GET "/adherent/members/2/adhesions" for 127.0.0.1 at 2015-03-21 08:50:07 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"2"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 2]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 2]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 10.3ms | ActiveRecord: 3.5ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 2]] SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 3], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/3/adhesions" for 127.0.0.1 at 2015-03-21 08:50:07 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"3"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 3]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 3]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 8.9ms | ActiveRecord: 3.4ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 4], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/4/adhesions" for 127.0.0.1 at 2015-03-21 08:50:07 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 4]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 9.3ms | ActiveRecord: 4.2ms) Started GET "/adherent/members/4/adhesions/3/edit" for 127.0.0.1 at 2015-03-21 08:50:07 +0100 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"4", "id"=>"3"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 4], ["id", "3"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 13.3ms | ActiveRecord: 1.6ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 5], ["updated_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 5], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 07:50:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/5/adhesions" for 127.0.0.1 at 2015-03-21 08:50:07 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"5"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 5]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 9.2ms | ActiveRecord: 2.3ms) Started GET "/adherent/members/5/payments/new" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"5"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 5]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 21.6ms | ActiveRecord: 3.1ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 6], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 6], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 6], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 6]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 6]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 6], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/6/payments/new" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"6"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "6"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 6]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 6]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 15.3ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/6/payments" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"6"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "6"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 6]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 6]] SQL (1.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 6], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 6]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 5], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/6/payments Completed 302 Found in 22ms (ActiveRecord: 6.8ms) Started GET "/adherent/members/6/payments" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"6"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "6"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 6]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 5]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 6]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 6]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (19.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 22.2ms | ActiveRecord: 5.2ms)  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 6]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 7], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 7], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 7], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 9]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 9]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 9], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/9/payments/new" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"9"} Organism Load (3.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "9"]] Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 14.7ms | ActiveRecord: 6.8ms) Started POST "/adherent/members/9/payments" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"9"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "9"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 9]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 7]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 9], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 6], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["payment_id", 2], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/9/payments Completed 302 Found in 20ms (ActiveRecord: 5.9ms) Started GET "/adherent/members/9/payments" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"9"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 9]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 6]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 9]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 9]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 15.7ms | ActiveRecord: 5.4ms) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (1.2ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 8], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 8], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 8], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 12]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 12]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 12], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/12/payments/new" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"12"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "12"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 8]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 12]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.9ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/12/payments" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"12"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "12"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 12]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 8]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 12], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 12]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 7], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["payment_id", 3], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/12/payments Completed 302 Found in 22ms (ActiveRecord: 6.4ms) Started GET "/adherent/members/12/payments" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"12"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 12]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 12]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 12]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.7ms | ActiveRecord: 5.3ms) Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 12]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 13]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 13]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 13], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 14]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 14]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 14], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/3/reglements/new" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"3"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 12]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (17.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 22.4ms | ActiveRecord: 6.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 9], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 9], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 9], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 15]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 15]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 15], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/15/payments/new" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"15"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 9]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 15]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.8ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/15/payments" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"15"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 9]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 15], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 15]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 10], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["payment_id", 4], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/15/payments Completed 302 Found in 21ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/15/payments" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"15"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 15]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 10]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 15.0ms | ActiveRecord: 4.3ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 15]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 16]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 16]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 16], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 17]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 17]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 17], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/4/reglements/new" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"4"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 18.7ms | ActiveRecord: 5.9ms)  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 10], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 10], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 10], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 18]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 18]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 18], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/18/payments/new" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"18"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "18"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 10]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 18]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.9ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/18/payments" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"18"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "18"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 18]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 10]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 18], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 18]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 13], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["payment_id", 5], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/18/payments Completed 302 Found in 19ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/18/payments" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"18"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "18"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 18]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 18]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.2ms | ActiveRecord: 4.5ms) Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 18]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 19]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 19]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 19], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 20]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 20]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 20], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/5/reglements/new" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"5"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.9ms | ActiveRecord: 5.8ms) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 18]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 18]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 11], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 11], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 11], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 21]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 21]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 21], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/21/payments/new" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"21"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "21"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 11]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 21]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.1ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/21/payments" for 127.0.0.1 at 2015-03-21 08:50:08 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"21"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "21"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 21]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 11]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 21], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 21]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 16], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["payment_id", 6], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/21/payments Completed 302 Found in 19ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/21/payments" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"21"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "21"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 21]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 21]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.3ms | ActiveRecord: 4.7ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 21]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 22]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 22]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 22], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 23]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 23]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 23], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/6/reglements/new" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"6"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "6"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 21]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.1ms | ActiveRecord: 4.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 12], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 12], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 12], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 24]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 24]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 24], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/24/payments/new" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"24"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "24"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 12]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 24]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.9ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/24/payments" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"24"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "24"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 12]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 24], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 24]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 19], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/24/payments Completed 302 Found in 19ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/24/payments" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"24"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "24"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 24]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.5ms | ActiveRecord: 3.9ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 24]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 25]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 25]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 25], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 26]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 26]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 26], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/7/reglements/new" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"7"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.1ms | ActiveRecord: 5.6ms) Started POST "/adherent/payments/7/reglements" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"20"}, "commit"=>"Enregistrer", "payment_id"=>"7"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "20"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 20], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]] Redirected to http://www.example.com/adherent/members/24/payments Completed 302 Found in 12ms (ActiveRecord: 3.8ms) Started GET "/adherent/members/24/payments" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"24"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "24"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 24]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.8ms | ActiveRecord: 5.0ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 13], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 13], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 13], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (2.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 27]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 27]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 27], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/27/payments/new" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"27"} Organism Load (5.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "27"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 27]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 98ms (Views: 13.8ms | ActiveRecord: 7.7ms) Started POST "/adherent/members/27/payments" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"27"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "27"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 13]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 27], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 27]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 22], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/27/payments Completed 302 Found in 27ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/27/payments" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"27"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "27"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 27]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.3ms | ActiveRecord: 4.5ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 27]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 28]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 28]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 28], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 29]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 29]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 29], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/8/reglements/new" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"8"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 28]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 16.9ms | ActiveRecord: 5.8ms) Started POST "/adherent/payments/8/reglements" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"23"}, "commit"=>"Enregistrer", "payment_id"=>"8"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "23"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 23], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]] Redirected to http://www.example.com/adherent/members/27/payments Completed 302 Found in 13ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/27/payments" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"27"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "27"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 27]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 15.8ms | ActiveRecord: 6.1ms) Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 30]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 30]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 30], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/30/payments/new" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"30"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "30"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 30]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.1ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/30/payments" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"30"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "30"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 30]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 14]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 30], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 30]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 25], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/30/payments Completed 302 Found in 18ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/30/payments" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"30"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "30"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 30]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 30]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.5ms | ActiveRecord: 4.7ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 30]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 31]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 31]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 31], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 32]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 32]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 32], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/9/reglements/new" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"9"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 31]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.3ms | ActiveRecord: 5.8ms) Started POST "/adherent/payments/9/reglements" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"26"}, "commit"=>"Enregistrer", "payment_id"=>"9"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 26], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 30]] Redirected to http://www.example.com/adherent/members/30/payments Completed 302 Found in 11ms (ActiveRecord: 3.8ms) Started GET "/adherent/members/30/payments" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"30"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "30"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 30]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 30]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 16.5ms | ActiveRecord: 4.9ms) Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 31]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 33]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 33]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 33], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/33/payments/new" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"33"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "33"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 33]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.8ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/33/payments" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"33"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "33"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 15]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 33], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 33]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 28], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/33/payments Completed 302 Found in 18ms (ActiveRecord: 4.1ms) Started GET "/adherent/members/33/payments" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"33"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "33"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 33]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.0ms | ActiveRecord: 3.7ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 33]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 34]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 34]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 34], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 35]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 35]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 35], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/10/reglements/new" for 127.0.0.1 at 2015-03-21 08:50:09 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"10"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (138.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 151ms (Views: 141.2ms | ActiveRecord: 5.1ms) Started POST "/adherent/payments/10/reglements" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"29"}, "commit"=>"Enregistrer", "payment_id"=>"10"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "29"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 29], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]] Redirected to http://www.example.com/adherent/members/33/payments Completed 302 Found in 13ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/33/payments" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"33"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "33"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 33]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 15.9ms | ActiveRecord: 4.9ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 16], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 16], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1  (1.0ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 16], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 36]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 36]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 36], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/36/payments/new" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"36"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "36"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 36]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.1ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/36/payments" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"36"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "36"]]  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 16]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 36], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 36]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 31], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/36/payments Completed 302 Found in 18ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/36/payments" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"36"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 36]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.3ms | ActiveRecord: 4.5ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 36]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 37]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 37]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 37], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 38]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 38]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 38], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/11/reglements/new" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"11"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 18.8ms | ActiveRecord: 5.6ms) Started POST "/adherent/payments/11/reglements" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"32"}, "commit"=>"Enregistrer", "payment_id"=>"11"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "32"]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 32], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]] Redirected to http://www.example.com/adherent/members/36/payments Completed 302 Found in 14ms (ActiveRecord: 4.0ms) Started GET "/adherent/members/36/payments" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"36"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 36]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 16.0ms | ActiveRecord: 4.4ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.6ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 17], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 17], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (2.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 17], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 39]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 39]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 39], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/39/payments/new" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"39"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "39"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 39]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.0ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/39/payments" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"39"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "39"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 39]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 17]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 39], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 39]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 34], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["payment_id", 12], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/39/payments Completed 302 Found in 17ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/39/payments" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"39"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "39"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 39]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 39]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 39]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.5ms | ActiveRecord: 4.0ms)  (1.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 39]]  (0.7ms) ROLLBACK  (0.5ms) BEGIN  (0.5ms) COMMIT  (0.6ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 18], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 18], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 42]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 42]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 42], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.1ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 42]] Started GET "/adherent/members/42/payments/new" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"42"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "42"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 42]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 14.0ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/42/payments" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"42"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "42"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 42]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 18]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 42], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 42]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 35], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["payment_id", 13], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/42/payments Completed 302 Found in 18ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/42/payments" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"42"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "42"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 42]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 42]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 42]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.2ms | ActiveRecord: 4.0ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 42]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 45]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 45]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 45], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/45/payments/new" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"45"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "45"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 45]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 91ms (Views: 12.9ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/45/payments" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"45"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "45"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 45]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 19]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 45], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 45]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 36], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["payment_id", 14], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/45/payments Completed 302 Found in 20ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/45/payments" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"45"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "45"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 45]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 45]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 45]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 13.7ms | ActiveRecord: 4.3ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 48]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 48]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 48], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/48/payments/new" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"48"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "48"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 48]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.8ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/48/payments" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"48"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "48"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 48]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 20]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 48], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 48]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 37], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["payment_id", 15], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/48/payments Completed 302 Found in 19ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/48/payments" for 127.0.0.1 at 2015-03-21 08:50:10 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"48"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "48"]] Adherent::Payment Load (0.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 48]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 37]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 48]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 48]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.7ms | ActiveRecord: 3.7ms)  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 48]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 51]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 51]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 51], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/51/payments/new" for 127.0.0.1 at 2015-03-21 08:50:11 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"51"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "51"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 21]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 51]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.2ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/51/payments" for 127.0.0.1 at 2015-03-21 08:50:11 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"51"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "51"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 51]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 21]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 51], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 51]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 38], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["payment_id", 16], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/51/payments Completed 302 Found in 20ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/51/payments" for 127.0.0.1 at 2015-03-21 08:50:11 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"51"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "51"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 51]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 51]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 51]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.8ms | ActiveRecord: 4.2ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 51]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x68b5f5a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x68b5f5a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x68cf798 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x68fb690 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x690af00 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x691a5ea @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x692e6bc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6946848 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6946848%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x69612ba @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x69612ba%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x697b110 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6af8e7a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6b0a94a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 54], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 54]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 54]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 54], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 54]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 33]]  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 55], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 55]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 55]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 55], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 55]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 34]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 55], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 55]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 41]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 41], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["payment_id", 17], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 42]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 42], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["payment_id", 17], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 35], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 56], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 56]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 56]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 56], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (4.9ms) SELECT COUNT(*) FROM "adherent_payments"  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 56]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 35]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 36], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 57], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 57]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 57]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 57], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 57]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 36]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 57], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 57]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 45], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["payment_id", 18], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 46], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["payment_id", 18], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 37], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 58], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 58]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 58]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 58], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 58]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 37]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 58], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 58]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 47]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 47], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 38], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 59]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 59]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 59], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/59/payments/new" for 127.0.0.1 at 2015-03-21 08:50:11 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"59"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "59"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 59]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.4ms | ActiveRecord: 1.9ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 39], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 60]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 60]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 60], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/60/payments/new" for 127.0.0.1 at 2015-03-21 08:50:11 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"60"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "60"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 39]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 60]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 19ms (Views: 13.0ms | ActiveRecord: 1.5ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 40], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 61]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 61]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 61], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 61]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 40]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 61], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 61]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/61/payments/20" for 127.0.0.1 at 2015-03-21 08:50:11 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"61", "id"=>"20"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "61"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 20 LIMIT 1 [["member_id", 61]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 61]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.1ms | ActiveRecord: 3.2ms) SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 41], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 62]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 62]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 62], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 62]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 41]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 62], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 62]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/62/payments/21" for 127.0.0.1 at 2015-03-21 08:50:11 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"62", "id"=>"21"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "62"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 21 LIMIT 1 [["member_id", 62]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 62]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.2ms | ActiveRecord: 3.8ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 42], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 63]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 63]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 63], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 63]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 42]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 63], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 63]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/63/payments/22" for 127.0.0.1 at 2015-03-21 08:50:11 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"63", "id"=>"22"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "63"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 22 LIMIT 1 [["member_id", 63]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 63]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.9ms | ActiveRecord: 4.4ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 43], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 64]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 64]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 64], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/64/payments/new" for 127.0.0.1 at 2015-03-21 08:50:11 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"64"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "64"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 43]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 64]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.4ms | ActiveRecord: 1.9ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 44], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 65]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 65]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 65], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/65/payments/new" for 127.0.0.1 at 2015-03-21 08:50:11 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"65"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "65"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 44]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 65]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.6ms | ActiveRecord: 1.8ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 65]] Started POST "/adherent/members/65/payments" for 127.0.0.1 at 2015-03-21 08:50:11 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"65"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "65"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 65]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 44]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 65], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:11 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 65]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/65/payments Completed 302 Found in 14ms (ActiveRecord: 4.0ms) Started GET "/adherent/members/65/payments" for 127.0.0.1 at 2015-03-21 08:50:11 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"65"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "65"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 65]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 65]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.5ms | ActiveRecord: 3.4ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 65]] SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 45], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 66]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 66]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 66], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 66]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 45]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 66], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 66]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/66/payments" for 127.0.0.1 at 2015-03-21 08:50:12 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"66"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "66"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 66]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 66]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.4ms | ActiveRecord: 3.4ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 46], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 67]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 67]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 67], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 67]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 46]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 67], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 67]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/67/payments" for 127.0.0.1 at 2015-03-21 08:50:12 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"67"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "67"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 67]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Reglement Load (4.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 67]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (80.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 90ms (Views: 79.8ms | ActiveRecord: 7.9ms) Started GET "/adherent/payments/25/reglements/new" for 127.0.0.1 at 2015-03-21 08:50:12 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"25"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "25"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 67]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.4ms | ActiveRecord: 3.6ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 47], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/68/coord/new" for 127.0.0.1 at 2015-03-21 08:50:12 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"68"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 68]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 19.4ms | ActiveRecord: 1.7ms) Started POST "/adherent/members/68/coord" for 127.0.0.1 at 2015-03-21 08:50:12 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"68"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]] Adherent::Coord Load (1.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 68]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 68], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/68/adhesions/new Completed 302 Found in 11ms (ActiveRecord: 4.0ms) Started GET "/adherent/members/68/adhesions/new" for 127.0.0.1 at 2015-03-21 08:50:12 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"68"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 68]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 68]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.6ms | ActiveRecord: 1.7ms) Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 68]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 48], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/69/coord/new" for 127.0.0.1 at 2015-03-21 08:50:12 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"69"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "69"]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 69]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (14.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 17.4ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/69/coord" for 127.0.0.1 at 2015-03-21 08:50:12 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"69"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "69"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 69]]  (0.5ms) SAVEPOINT active_record_1 SQL (2.2ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 69], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["zip", ""]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/69/adhesions/new Completed 302 Found in 13ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/69/adhesions/new" for 127.0.0.1 at 2015-03-21 08:50:12 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"69"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "69"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 69]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 69]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.4ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 49], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/70/coord/new" for 127.0.0.1 at 2015-03-21 08:50:12 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"70"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 70]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 18.6ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 50], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/71/coord/new" for 127.0.0.1 at 2015-03-21 08:50:12 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"71"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 71]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 18.8ms | ActiveRecord: 1.3ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/71/coord" for 127.0.0.1 at 2015-03-21 08:50:12 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"71"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 71]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 71], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["zip", ""]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/71/adhesions/new Completed 302 Found in 8ms (ActiveRecord: 2.5ms) Started GET "/adherent/members/71/adhesions/new" for 127.0.0.1 at 2015-03-21 08:50:12 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"71"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 71]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 71]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.7ms | ActiveRecord: 1.7ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 58]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 58], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 59], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 60], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 51], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 51], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 72], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 73], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 73]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 51]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 73], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 73]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 62], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["payment_id", 26], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 73]] Organism Load (0.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 51]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 73], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 73]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 62], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["payment_id", 27], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 72]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 51]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 72], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 72]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 61]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 61], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["payment_id", 28], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 52], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 52], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 74], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 75], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 75]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 52]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 75], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 75]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 64]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 64], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["payment_id", 29], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 53], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 53], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 76], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 77], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 77]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 53]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 77], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 77]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 66]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 66], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["payment_id", 30], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 76]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 53]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 76], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 76]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 65], ["amount", #], ["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["payment_id", 31], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.5ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"78"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"79"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/79 Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"80"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/80 Completed 302 Found in 6ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"81"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 81 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 81 [["name", "Dalton"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/81 Completed 302 Found in 12ms (ActiveRecord: 3.6ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 58], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/82/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.8ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 59], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/83/coord/new Completed 302 Found in 13ms (ActiveRecord: 4.2ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 60], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/84/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x660f1ac @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x6623206 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.3ms | ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x68a6262 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x68cfad6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x68cfad6%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x68fb5a0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x68fb5a0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6911eea @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x69215c0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x693279e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x694c392 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x6966a58 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6966a58%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x69836bc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x69836bc%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6b0323a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.1ms | ActiveRecord: 2.9ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6b131ee @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.8ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6b2b140 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6b2b140%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6b4a478 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 07:50:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 2.5ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["member_id", 85], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["zip", 59000]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 85]]  (1.3ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 4]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 85]] SQL (0.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 85]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64efd58 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 27ms (Views: 6.4ms | ActiveRecord: 4.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x601d4d8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.7ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62fde32 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.5ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x635a588 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6379f1e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6379f1e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (1.9ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6398b26 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.0ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x63b6766 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x63dbb38 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x63dbb38%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x63fa7d6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x63fa7d6%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x6423e9c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x644db8e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x6494e6c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6494e6c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x64b64cc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x64b64cc%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) BEGIN SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (118.5ms) COMMIT Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 98], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 98], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 98], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 98], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 98], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) BEGIN Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 86]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 98]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 86], ["mode", "Chèque"], ["updated_at", Sat, 21 Mar 2015 10:12:11 UTC +00:00]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 86]]  (2.2ms) COMMIT Started GET "/adherent/members/86/payments/32" for 127.0.0.1 at 2015-03-21 11:12:16 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"86", "id"=>"32"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "86"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 32 LIMIT 1 [["member_id", 86]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 86]] Adherent::Reglement Load (3.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Reglement Load (3.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (25.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (5.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.4ms) Completed 200 OK in 98ms (Views: 69.1ms | ActiveRecord: 19.8ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-03-21 11:12:16 +0100 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-03-21 11:12:16 +0100 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-03-21 11:12:17 +0100 Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-03-21 11:12:17 +0100 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-03-21 11:12:17 +0100 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-03-21 11:12:17 +0100 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-03-21 11:12:17 +0100 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-03-21 11:12:17 +0100 Started DELETE "/adherent/members/86/payments/32" for 127.0.0.1 at 2015-03-21 11:12:17 +0100 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"86", "id"=>"32"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "86"]] Adherent::Payment Load (9.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 86], ["id", "32"]]  (0.2ms) BEGIN Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] SQL (0.5ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 32]]  (54.9ms) COMMIT Redirected to http://127.0.0.1:50524/adherent/members/86/payments Completed 302 Found in 100ms (ActiveRecord: 87.3ms) Started GET "/adherent/members/86/payments" for 127.0.0.1 at 2015-03-21 11:12:18 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"86"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "86"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 86]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 8.9ms | ActiveRecord: 2.5ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-03-21 11:12:18 +0100  (0.6ms) SELECT COUNT(*) FROM "adherent_payments"  (0.6ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (1.3ms) select table_name from information_schema.views where table_schema = 'adh_test'  (91.0ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.6ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:19 UTC +00:00]]  (113.6ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:19 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:19 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:19 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:19 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:19 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:12:19 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (3.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]] Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 63ms (Views: 41.4ms | ActiveRecord: 17.2ms) Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-03-21 11:12:19 +0100 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-03-21 11:12:19 +0100 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-03-21 11:12:19 +0100 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-03-21 11:12:19 +0100 Started GET "/assets/back_disabled.png" for 127.0.0.1 at 2015-03-21 11:12:19 +0100 Started GET "/assets/forward_disabled.png" for 127.0.0.1 at 2015-03-21 11:12:19 +0100 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-03-21 11:12:19 +0100 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2015-03-21 11:12:20 +0100 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.1ms) BEGIN Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] SQL (0.5ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (115.8ms) COMMIT Redirected to http://127.0.0.1:50524/adherent/members Completed 302 Found in 127ms (ActiveRecord: 118.6ms) Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:12:20 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (1.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 23.9ms | ActiveRecord: 8.3ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_members"  (0.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (1.3ms) select table_name from information_schema.views where table_schema = 'adh_test'  (148.6ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_reglements", "adherent_payments", "organisms" RESTART IDENTITY CASCADE;  (0.6ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL SQL (1.0ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:21 UTC +00:00]]  (111.5ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:22 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:22 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:22 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:22 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:22 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.3ms) BEGIN SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:22 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:22 UTC +00:00]]  (1.7ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-03-21 11:12:22 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (5.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (1.1ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40ms (Views: 25.2ms | ActiveRecord: 9.3ms) Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2015-03-21 11:12:23 +0100 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (2.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (5.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (45.2ms) COMMIT Redirected to http://127.0.0.1:50524/adherent/members/1/adhesions Completed 302 Found in 67ms (ActiveRecord: 56.5ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-03-21 11:12:23 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:50524/adherent/members/1/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 2.8ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2015-03-21 11:12:23 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (33.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 45ms (Views: 38.8ms | ActiveRecord: 2.4ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-03-21 11:12:23 +0100  (0.8ms) SELECT COUNT(*) FROM "adherent_adhesions"  (0.9ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (1.6ms) select table_name from information_schema.views where table_schema = 'adh_test'  (177.2ms) TRUNCATE TABLE "adherent_coords", "adherent_members", "adherent_adhesions", "adherent_payments", "organisms", "adherent_reglements" RESTART IDENTITY CASCADE;  (0.6ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL  (0.1ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x668c706 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 3.7ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x..fdb052692 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.5ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x..fdb0677cc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 4.4ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x..fdb06cfce @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x..fdaf0254e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.0ms | ActiveRecord: 2.6ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x..fdb576d12 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.7ms | ActiveRecord: 2.8ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x..fdb53cc98 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x..fdb53cc98%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 7ms (ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x..fdb547ab2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x..fdb547ab2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.6ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x..fdb54f7c6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x69736c2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x69736c2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 7ms (ActiveRecord: 2.8ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x698d2fc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 12], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 12], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 12], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 12], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 12], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:12:24 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 12]]  (2.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 42ms (Views: 29.8ms | ActiveRecord: 10.2ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 13], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 13], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 13], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 13], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 13], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:12:24 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 13]]  (1.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 6]] Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 6]]  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 7]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 8]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 9]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 9]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 10]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40ms (Views: 27.2ms | ActiveRecord: 10.3ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:12:24 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 14]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 11]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 12]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 12]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 13]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 13]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 14]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 15]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 26.5ms | ActiveRecord: 5.9ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/11/edit" for 127.0.0.1 at 2015-03-21 11:12:24 +0100 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"11"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 18.0ms | ActiveRecord: 1.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 10:12:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:12:24 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 15]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 16]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 16]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 17]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 18]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 18]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 19]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 19]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 20]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 26.0ms | ActiveRecord: 6.3ms) Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/16/adhesions" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"16"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 16]] Redirected to http://www.example.com/adherent/members/16/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.7ms) Started GET "/adherent/members/16/adhesions/new" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"16"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 16]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.6ms | ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 16], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 16], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 16], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 16], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 16], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 16]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 21]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 21]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 22]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 22]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 23]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 23]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 24]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 24]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 25]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 36ms (Views: 28.1ms | ActiveRecord: 6.0ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/21/payments" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"21"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "21"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 21]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 11ms (Views: 4.5ms | ActiveRecord: 3.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 17], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 17], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 17], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 17], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 17], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 17]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 26]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 27]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 27]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 28]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 28]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 29]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 29]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 30]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 30]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 25.5ms | ActiveRecord: 5.7ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/26/coord" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"26"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 26]] Redirected to http://www.example.com/adherent/members/26/coord/new Completed 302 Found in 5ms (ActiveRecord: 1.4ms) Started GET "/adherent/members/26/coord/new" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"26"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 26]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (19.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 24.2ms | ActiveRecord: 1.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 18], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 18], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 18], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 18], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 18]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 31]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 31]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 32]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 32]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 33]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 33]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 34]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 34]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 35]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 27.2ms | ActiveRecord: 5.9ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["member_id", 31], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 31]] Started GET "/adherent/members/31/coord" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"31"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 11ms (Views: 5.6ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 19]]  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 36]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 36]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 37]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 37]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 38]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 38]]  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 39]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 39]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 40]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 40]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 25.2ms | ActiveRecord: 7.3ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 13.2ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (2.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 20]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 41]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 41]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 42]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 42]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 43]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 43]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 44]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 45]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 45]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 25.6ms | ActiveRecord: 5.3ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 41]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 41]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 41], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/41/adhesions" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"41"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 41]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 41]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 8.9ms | ActiveRecord: 4.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 12.5ms | ActiveRecord: 0.7ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/51/coord/new Completed 302 Found in 10ms (ActiveRecord: 2.4ms) Started GET "/adherent/members/51/coord/new" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"51"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "51"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 51]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 18.8ms | ActiveRecord: 1.4ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/52/adhesions/new" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"52"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "52"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 52]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 52]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.0ms | ActiveRecord: 2.5ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/53/adhesions/new" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"53"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "53"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 53]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 53]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 10.9ms | ActiveRecord: 1.7ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 53]] Started POST "/adherent/members/53/adhesions" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"53"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "53"]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 53], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/53/adhesions Completed 302 Found in 9ms (ActiveRecord: 2.9ms) Started GET "/adherent/members/53/adhesions" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"53"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "53"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 53]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 53]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 8.2ms | ActiveRecord: 2.7ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 53]] SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 54], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/54/adhesions" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"54"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "54"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 54]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 54]]  (5.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 85ms (Views: 74.1ms | ActiveRecord: 7.5ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 55], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:12:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/55/adhesions" for 127.0.0.1 at 2015-03-21 11:12:25 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"55"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "55"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 55]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 55]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 9.0ms | ActiveRecord: 3.0ms) Started GET "/adherent/members/55/adhesions/4/edit" for 127.0.0.1 at 2015-03-21 11:12:26 +0100 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"55", "id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "55"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 55], ["id", "4"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.9ms | ActiveRecord: 2.3ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 56], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/56/adhesions" for 127.0.0.1 at 2015-03-21 11:12:26 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"56"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "56"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 56]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 56]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 9.4ms | ActiveRecord: 2.4ms) Started GET "/adherent/members/56/payments/new" for 127.0.0.1 at 2015-03-21 11:12:26 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"56"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "56"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 56]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (15.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 21.4ms | ActiveRecord: 3.7ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 60]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 60]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 60], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 60]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 60]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 61]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 61]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 61], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 61]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 61]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 62]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 62]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 62], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 62]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 62]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]]  (0.6ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 9], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 10], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 11], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 27], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 27], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 63], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 64], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 64]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 27]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 64], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 64]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 13], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 64]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 27]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 64], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 64]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 13], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["payment_id", 2], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 63]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 27]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 63], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 63]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 12], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["payment_id", 3], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 28], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 65], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 66], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 66]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 28]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 66], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 66]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 15], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["payment_id", 4], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 29], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 67], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 68], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 68]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 68], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 68]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 17], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["payment_id", 5], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 67]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 67], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 67]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 16], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["payment_id", 6], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x6adface @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (1.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 3.2ms | ActiveRecord: 3.3ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x6af3222 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x6b0be80 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6b0bea8%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 69]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 69]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 69], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/69/payments/new" for 127.0.0.1 at 2015-03-21 11:12:26 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"69"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "69"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 69]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (16.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 20.6ms | ActiveRecord: 2.9ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 70]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 70]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 70], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/70/payments/new" for 127.0.0.1 at 2015-03-21 11:12:26 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"70"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 70]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.3ms | ActiveRecord: 2.9ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 35], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 71]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 71]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 71], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/71/payments/new" for 127.0.0.1 at 2015-03-21 11:12:26 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"71"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 71]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.9ms | ActiveRecord: 2.3ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 36], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 72]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 72]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 72], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/72/payments/new" for 127.0.0.1 at 2015-03-21 11:12:26 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"72"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "72"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 72]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.6ms | ActiveRecord: 2.1ms)  (1.2ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 72]] Started POST "/adherent/members/72/payments" for 127.0.0.1 at 2015-03-21 11:12:26 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"72"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "72"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 72]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 36]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 72], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 72]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/72/payments Completed 302 Found in 19ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/72/payments" for 127.0.0.1 at 2015-03-21 11:12:26 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"72"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "72"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 72]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 72]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 15.6ms | ActiveRecord: 5.0ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 72]] SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 37], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 73]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 73]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 73], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 73]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 37]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 73], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:26 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 73]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/73/payments" for 127.0.0.1 at 2015-03-21 11:12:26 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"73"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "73"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 73]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 73]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.3ms | ActiveRecord: 4.8ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 38], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 74]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 74]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 74], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 74]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 38]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 74], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 74]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/74/payments" for 127.0.0.1 at 2015-03-21 11:12:27 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"74"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "74"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 74]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 74]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.9ms | ActiveRecord: 5.1ms) Started GET "/adherent/payments/9/reglements/new" for 127.0.0.1 at 2015-03-21 11:12:27 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"9"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 74]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 17.9ms | ActiveRecord: 4.0ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 39], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 75]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 75]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 75], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 75]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 39]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 75], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 75]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/75/payments/10" for 127.0.0.1 at 2015-03-21 11:12:27 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"75", "id"=>"10"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "75"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 10 LIMIT 1 [["member_id", 75]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 75]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.8ms | ActiveRecord: 4.2ms) SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 40], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 76]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 76]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 76], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 76]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 40]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 76], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 76]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/76/payments/11" for 127.0.0.1 at 2015-03-21 11:12:27 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"76", "id"=>"11"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "76"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 11 LIMIT 1 [["member_id", 76]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 76]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.8ms | ActiveRecord: 4.4ms) SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 41], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 77]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 77]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 77], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 77]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 41]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 77], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 77]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/77/payments/12" for 127.0.0.1 at 2015-03-21 11:12:27 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"77", "id"=>"12"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "77"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 12 LIMIT 1 [["member_id", 77]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 77]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.2ms | ActiveRecord: 4.0ms) SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (1.6ms) COMMIT  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 42], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 78], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 78]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 78]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 78], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 78]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 42]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 78], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 78]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 27], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["payment_id", 13], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 28], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["payment_id", 13], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 43], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 79], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 79]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 79]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 79], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 79]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 43]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 79], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 79]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 29], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["payment_id", 14], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 30], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["payment_id", 14], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 44], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 80], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 80]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 80]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 80], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 80]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 44]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 80], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 80]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 31], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["payment_id", 15], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 45], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 81], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 81]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 81]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 81], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 81]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 45]]  (0.6ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 46], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (1.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 82], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 82]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 82]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 82], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 82]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 46]]  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 47], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/83/coord/new" for 127.0.0.1 at 2015-03-21 11:12:27 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"83"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "83"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 83]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 19.3ms | ActiveRecord: 1.4ms) Started POST "/adherent/members/83/coord" for 127.0.0.1 at 2015-03-21 11:12:27 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"83"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "83"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 83]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 83], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/83/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 3.3ms) Started GET "/adherent/members/83/adhesions/new" for 127.0.0.1 at 2015-03-21 11:12:27 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"83"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "83"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 83]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 83]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.7ms | ActiveRecord: 2.3ms) Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 83]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 48], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/84/coord/new" for 127.0.0.1 at 2015-03-21 11:12:27 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"84"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "84"]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 84]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (19.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 22.8ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 49], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/85/coord/new" for 127.0.0.1 at 2015-03-21 11:12:27 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"85"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "85"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 85]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 19.5ms | ActiveRecord: 1.3ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/85/coord" for 127.0.0.1 at 2015-03-21 11:12:27 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"85"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "85"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 85]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 85], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/85/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 2.7ms) Started GET "/adherent/members/85/adhesions/new" for 127.0.0.1 at 2015-03-21 11:12:27 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"85"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "85"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 85]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 85]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.0ms | ActiveRecord: 1.7ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 50], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/86/coord/new" for 127.0.0.1 at 2015-03-21 11:12:27 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"86"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "86"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 86]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 19.6ms | ActiveRecord: 1.6ms) Started POST "/adherent/members/86/coord" for 127.0.0.1 at 2015-03-21 11:12:27 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"86"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "86"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 86]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 86], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/86/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 3.3ms) Started GET "/adherent/members/86/adhesions/new" for 127.0.0.1 at 2015-03-21 11:12:27 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"86"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "86"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 86]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 86]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.5ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x..fdb066c1e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.3ms)  (0.6ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x..fdb077276 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x..fdb077276%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 7ms (ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x..fdaf0e0c4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x..fdaf0e0c4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x..fdb57a3fe @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x..fdb5449d4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (1.1ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x..fdb54d7dc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.5ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x68adb5c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x68accd4 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 3.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 59], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 59], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 59], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 87]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 87]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 87], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/87/payments/new" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"87"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "87"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 59]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 87]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.7ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/87/payments" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"87"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "87"]]  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 87]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 59]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 87], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 87]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 37], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["payment_id", 16], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/87/payments Completed 302 Found in 20ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/87/payments" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"87"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "87"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 87]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 37]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 87]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 87]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 16.6ms | ActiveRecord: 4.5ms)  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 87]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 60], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 60], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 60], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 90]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 90]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 90], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/90/payments/new" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"90"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "90"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 60]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 90]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.3ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/90/payments" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"90"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "90"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 90]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 60]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 90], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 90]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 38], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["payment_id", 17], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/90/payments Completed 302 Found in 27ms (ActiveRecord: 6.6ms) Started GET "/adherent/members/90/payments" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"90"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "90"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 90]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 90]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 90]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.7ms | ActiveRecord: 4.4ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 90]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 61], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 61], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 61], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 93]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 93]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 93], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/93/payments/new" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"93"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 61]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 93]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.2ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/93/payments" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"93"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 93]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 61]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 93], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 93]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 39], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["payment_id", 18], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/93/payments Completed 302 Found in 20ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/93/payments" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"93"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 93]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 39]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 93]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 93]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.8ms | ActiveRecord: 4.7ms)  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 93]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 62], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 62], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 62], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 96]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 96]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 96], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 96]] Started GET "/adherent/members/96/payments/new" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"96"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "96"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 62]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 96]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 40]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 12.5ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/96/payments" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"96"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "96"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 96]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 62]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 96], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 96]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 40]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 40], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/96/payments Completed 302 Found in 25ms (ActiveRecord: 6.6ms) Started GET "/adherent/members/96/payments" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"96"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "96"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 96]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 40]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 96]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 96]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.5ms | ActiveRecord: 4.7ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 96]]  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 63], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 63], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 63], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 99]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 99]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 99], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/99/payments/new" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"99"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "99"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 63]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 99]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 41]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.5ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/99/payments" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"99"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "99"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 99]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 63]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 99], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 99]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 41]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 41], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["payment_id", 20], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/99/payments Completed 302 Found in 22ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/99/payments" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"99"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "99"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 99]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 41]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 99]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 99]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.9ms | ActiveRecord: 4.2ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 64], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 64], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 64], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 102]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 102]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 102], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/102/payments/new" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"102"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "102"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 64]] Adherent::Adhesion Load (67.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 102]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 42]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 90ms (Views: 13.4ms | ActiveRecord: 69.1ms) Started POST "/adherent/members/102/payments" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"102"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "102"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 102]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 64]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 102], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 102]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 42]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 42], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["payment_id", 21], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/102/payments Completed 302 Found in 19ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/102/payments" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"102"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "102"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 102]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 42]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 102]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 102]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.0ms | ActiveRecord: 4.6ms)  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 102]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 65], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 65], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 65], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 105]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 105]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 105], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/105/payments/new" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"105"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "105"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 65]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 105]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 43]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.5ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/105/payments" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"105"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "105"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 105]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 65]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 105], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 105]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 43]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 43], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00], ["payment_id", 22], ["updated_at", Sat, 21 Mar 2015 10:12:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/105/payments Completed 302 Found in 17ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/105/payments" for 127.0.0.1 at 2015-03-21 11:12:28 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"105"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "105"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 105]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 43]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 105]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 105]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.7ms | ActiveRecord: 4.1ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 105]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 66], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 66], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 66], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 108]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 108]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 108], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/108/payments/new" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"108"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 66]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 108]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 44]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.2ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/108/payments" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"108"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 108]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 66]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 108], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 108]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 44]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 44], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["payment_id", 23], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/108/payments Completed 302 Found in 18ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/108/payments" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"108"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 108]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 44]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 108]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 108]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.6ms | ActiveRecord: 4.4ms) Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 108]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 109]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 109]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 109], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 110]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 110]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 110], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/23/reglements/new" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"23"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "23"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 108]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 110]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 109]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 17.1ms | ActiveRecord: 5.3ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 67], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 67], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 67], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 111]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 111]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 111], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/111/payments/new" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"111"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "111"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 67]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 111]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 47]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.8ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/111/payments" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"111"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "111"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 111]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 67]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 111], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 111]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 47]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 47], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["payment_id", 24], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/111/payments Completed 302 Found in 19ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/111/payments" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"111"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "111"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 111]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 47]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 111]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 111]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 17.0ms | ActiveRecord: 5.8ms) Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 111]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 112]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 112]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 112], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 113]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 113]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 113], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/24/reglements/new" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"24"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "24"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 111]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 112]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 113]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 49]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 17.9ms | ActiveRecord: 5.3ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 111]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 111]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]]  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 68], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 68], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 68], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 114]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 114]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 114], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/114/payments/new" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"114"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 68]] Adherent::Adhesion Load (63.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 114]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 50]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 90ms (Views: 12.2ms | ActiveRecord: 65.6ms) Started POST "/adherent/members/114/payments" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"114"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 114]] Organism Load (0.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 68]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 114], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 114]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 50]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 50], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["payment_id", 25], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/114/payments Completed 302 Found in 19ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/114/payments" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"114"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 114]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 50]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 114]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 114]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.1ms | ActiveRecord: 5.4ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 114]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 115]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 115]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 115], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 116]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 116]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 116], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/25/reglements/new" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"25"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "25"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 114]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 115]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 51]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 116]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 52]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 16.3ms | ActiveRecord: 6.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 69], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 69], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 69], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 117]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 117]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 117], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/117/payments/new" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"117"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]] Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 69]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 117]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 53]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (13.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 16.8ms | ActiveRecord: 4.2ms) Started POST "/adherent/members/117/payments" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"117"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 69]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 117], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 117]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 53]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 53], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["payment_id", 26], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/117/payments Completed 302 Found in 23ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/117/payments" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"117"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 117]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 53]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.4ms | ActiveRecord: 3.8ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 117]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 118]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 118]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 118], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 119]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 119]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 119], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/26/reglements/new" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"26"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 118]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 54]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 119]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.5ms | ActiveRecord: 5.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 70], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 70], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 70], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 120]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 120]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 120], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/120/payments/new" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"120"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 70]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 120]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 56]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.3ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/120/payments" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"120"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 70]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 120], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 120]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 56]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 56], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["payment_id", 27], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/120/payments Completed 302 Found in 18ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/120/payments" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"120"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 120]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 56]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.1ms | ActiveRecord: 4.9ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 120]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 121]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 121]]  (1.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 121], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 122]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 122]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 122], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/27/reglements/new" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"27"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "27"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 121]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 57]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 122]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 58]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.6ms | ActiveRecord: 5.0ms) Started POST "/adherent/payments/27/reglements" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"57"}, "commit"=>"Enregistrer", "payment_id"=>"27"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "27"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "57"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 57]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 57], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["payment_id", 27], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Redirected to http://www.example.com/adherent/members/120/payments Completed 302 Found in 12ms (ActiveRecord: 4.0ms) Started GET "/adherent/members/120/payments" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"120"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 120]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 56]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 57]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 121]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.7ms | ActiveRecord: 4.8ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 56]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 71], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 71], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 71], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 123]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 123]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 123], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/123/payments/new" for 127.0.0.1 at 2015-03-21 11:12:29 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"123"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 71]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 123]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (14.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 18.4ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/123/payments" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"123"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 71]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 123], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 123]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 59], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["payment_id", 28], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/123/payments Completed 302 Found in 21ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/123/payments" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"123"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 123]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 59]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.5ms | ActiveRecord: 4.2ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 123]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 124]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 124]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 124], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 125]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 125]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 125], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/28/reglements/new" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"28"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "28"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 124]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 125]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 61]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 17.0ms | ActiveRecord: 4.8ms) Started POST "/adherent/payments/28/reglements" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"60"}, "commit"=>"Enregistrer", "payment_id"=>"28"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "28"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "60"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 60], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["payment_id", 28], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]] Redirected to http://www.example.com/adherent/members/123/payments Completed 302 Found in 13ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/123/payments" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"123"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 123]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 59]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 60]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 124]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.4ms | ActiveRecord: 4.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 72) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 72) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 72], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 72) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 72) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 72], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 72) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 72) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 72], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 126]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 126]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 126], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/126/payments/new" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"126"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "126"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 72]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 126]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.7ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/126/payments" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"126"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "126"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 72]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 126], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 126]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 62], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["payment_id", 29], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/126/payments Completed 302 Found in 18ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/126/payments" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"126"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "126"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 126]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 62]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.6ms | ActiveRecord: 4.2ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 126]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 127]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 127]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 127], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 128]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 128]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 128], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/29/reglements/new" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"29"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "29"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 128]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 64]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 63]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 18.1ms | ActiveRecord: 5.9ms) Started POST "/adherent/payments/29/reglements" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"63"}, "commit"=>"Enregistrer", "payment_id"=>"29"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "29"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "63"]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 63]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 63], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["payment_id", 29], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]] Redirected to http://www.example.com/adherent/members/126/payments Completed 302 Found in 12ms (ActiveRecord: 3.9ms) Started GET "/adherent/members/126/payments" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"126"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "126"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 126]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 62]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 63]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.9ms | ActiveRecord: 4.6ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 73) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 73) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 73], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 73) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 73) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 73], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 73) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 73) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 73], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 129]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 129]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 129], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/129/payments/new" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"129"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "129"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 73]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 129]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.8ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/129/payments" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"129"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "129"]]  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 73]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 129], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 129]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 65], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["payment_id", 30], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/129/payments Completed 302 Found in 20ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/129/payments" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"129"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "129"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 129]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 65]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]]  (1.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.9ms | ActiveRecord: 5.5ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 129]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 130]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 130]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 130], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 131]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 131]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 131], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/30/reglements/new" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"30"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "30"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]]  (1.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Reglement Load (1.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 131]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 67]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 66]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 16.7ms | ActiveRecord: 6.6ms) Started POST "/adherent/payments/30/reglements" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"66"}, "commit"=>"Enregistrer", "payment_id"=>"30"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "30"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "66"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 66]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 66], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["payment_id", 30], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Redirected to http://www.example.com/adherent/members/129/payments Completed 302 Found in 15ms (ActiveRecord: 3.8ms) Started GET "/adherent/members/129/payments" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"129"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "129"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 129]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 65]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 66]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (18.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 23.7ms | ActiveRecord: 4.6ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 130]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 66]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 74) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 74) LIMIT 1 SQL (7.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 74], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 74) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 74) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 74], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 74) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 74) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 74], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 132]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 132]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 132], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/132/payments/new" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"132"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 74]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 132]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 68]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (18.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 24.1ms | ActiveRecord: 2.0ms) Started POST "/adherent/members/132/payments" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"132"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 74]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 132], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 132]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 68]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 68], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["payment_id", 31], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/132/payments Completed 302 Found in 27ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/132/payments" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"132"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 132]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 68]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 15.1ms | ActiveRecord: 2.9ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 132]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 133]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 133]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 133], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 134]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 134]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 134], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/31/reglements/new" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"31"} Organism Load (7.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "31"]] Adherent::Member Load (8.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] Adherent::Adhesion Load (2.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 69]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 134]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 70]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 44ms (Views: 17.4ms | ActiveRecord: 21.4ms) Started POST "/adherent/payments/31/reglements" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"69"}, "commit"=>"Enregistrer", "payment_id"=>"31"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "31"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "69"]] Adherent::Reglement Load (0.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 69]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 69], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["payment_id", 31], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Redirected to http://www.example.com/adherent/members/132/payments Completed 302 Found in 12ms (ActiveRecord: 2.9ms) Started GET "/adherent/members/132/payments" for 127.0.0.1 at 2015-03-21 11:12:30 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"132"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 132]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 68]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 69]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 16.4ms | ActiveRecord: 3.5ms) Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 69]] Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"135"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.7ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"136"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/136 Completed 302 Found in 16ms (ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (1.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"137"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 137 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 137 [["name", "Dalton"], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/137 Completed 302 Found in 12ms (ActiveRecord: 2.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"138"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/138 Completed 302 Found in 9ms (ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.7ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 80) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 80], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/139/coord/new Completed 302 Found in 15ms (ActiveRecord: 3.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 81], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/140/coord/new Completed 302 Found in 18ms (ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.2ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 83) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 83], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/141/coord/new Completed 302 Found in 10ms (ActiveRecord: 2.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.7ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x697b14c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 7ms (ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x698dbbc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (4.9ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 15ms (ActiveRecord: 6.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.7ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.6ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (5.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 92) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 92) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 92], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 92) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 92) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 92], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 92) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 92) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 92], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 142]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 142]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 142], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/142/payments/new" for 127.0.0.1 at 2015-03-21 11:12:55 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"142"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "142"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 92]] Adherent::Adhesion Load (2.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 142]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (34.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (41.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (3.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.2ms) Completed 200 OK in 104ms (Views: 59.3ms | ActiveRecord: 10.3ms) Started POST "/adherent/members/142/payments" for 127.0.0.1 at 2015-03-21 11:12:55 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"142"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "142"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 92]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 142], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 142]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 71], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["payment_id", 32], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/142/payments Completed 302 Found in 33ms (ActiveRecord: 6.5ms) Started GET "/adherent/members/142/payments" for 127.0.0.1 at 2015-03-21 11:12:55 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"142"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "142"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 142]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 71]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (20.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (28.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 25.9ms | ActiveRecord: 6.6ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 142]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 93], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 93], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 93], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 145]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 145]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 145], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/145/payments/new" for 127.0.0.1 at 2015-03-21 11:12:55 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"145"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "145"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 93]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 145]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 72]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.0ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/145/payments" for 127.0.0.1 at 2015-03-21 11:12:55 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"145"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "145"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 145]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 93]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 145], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 145]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 72]] SQL (1.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 72], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["payment_id", 33], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/145/payments Completed 302 Found in 20ms (ActiveRecord: 6.6ms) Started GET "/adherent/members/145/payments" for 127.0.0.1 at 2015-03-21 11:12:55 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"145"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "145"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 145]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 72]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 145]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 145]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.7ms | ActiveRecord: 4.0ms)  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 145]]  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 94) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 94) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 94], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 94) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 94) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 94], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 94) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 94) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 94], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 148]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 148]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 148], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/148/payments/new" for 127.0.0.1 at 2015-03-21 11:12:55 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"148"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "148"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 94]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 148]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 73]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.9ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/148/payments" for 127.0.0.1 at 2015-03-21 11:12:55 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"148"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "148"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 148]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 94]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 148], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 148]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 73]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 73], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["payment_id", 34], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/148/payments Completed 302 Found in 18ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/148/payments" for 127.0.0.1 at 2015-03-21 11:12:55 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"148"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "148"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 148]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 73]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 148]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 148]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (13.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.6ms | ActiveRecord: 4.3ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.9ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 95], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 95], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 95], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 151]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 151]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 151], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 151]] Started GET "/adherent/members/151/payments/new" for 127.0.0.1 at 2015-03-21 11:12:55 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"151"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "151"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 95]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 151]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 74]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 13.6ms | ActiveRecord: 4.5ms) Started POST "/adherent/members/151/payments" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"151"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "151"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 151]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 95]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 151], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 151]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 74]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 74], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["payment_id", 35], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/151/payments Completed 302 Found in 19ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/151/payments" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"151"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "151"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 151]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 74]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 151]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 151]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.1ms | ActiveRecord: 4.9ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 151]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 96], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 96], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 96], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 154]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 154]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 154], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/154/payments/new" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"154"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "154"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 96]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 154]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 75]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.2ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/154/payments" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"154"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "154"]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 96]] SQL (20.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 154], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 154]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 75]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 75], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["payment_id", 36], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/154/payments Completed 302 Found in 38ms (ActiveRecord: 24.8ms) Started GET "/adherent/members/154/payments" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"154"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "154"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 154]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 75]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.1ms | ActiveRecord: 4.8ms)  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 154]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 97], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 97], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 97], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 157]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 157]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 157], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/157/payments/new" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"157"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "157"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 97]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 157]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 76]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.3ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/157/payments" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"157"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "157"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 97]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 157], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 157]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 76]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 76], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["payment_id", 37], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/157/payments Completed 302 Found in 18ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/157/payments" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"157"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "157"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 157]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 76]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.9ms | ActiveRecord: 4.1ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 157]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 158]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 158]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 158], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 159]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 159]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 159], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/37/reglements/new" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"37"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "37"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 158]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 77]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 78]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (17.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (22.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 23.5ms | ActiveRecord: 5.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 98], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 98], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 98], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 160]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 160]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 160], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/160/payments/new" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"160"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "160"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 98]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 160]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 79]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.4ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/160/payments" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"160"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "160"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 160]] Organism Load (0.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 98]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 160], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 160]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 79]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 79], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["payment_id", 38], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/160/payments Completed 302 Found in 18ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/160/payments" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"160"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "160"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 160]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 79]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 160]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 160]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.9ms | ActiveRecord: 4.2ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 160]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 161]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 161]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 161], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 162]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 162]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 162], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/38/reglements/new" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"38"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 160]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 161]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 80]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 162]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 81]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (17.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 16.9ms | ActiveRecord: 5.5ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 160]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 160]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 99], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 99], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 99], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 163]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 163]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 163], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/163/payments/new" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"163"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "163"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 99]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 163]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 82]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.9ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/163/payments" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"163"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "163"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 163]] Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 99]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 163], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 163]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 82]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 82], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["payment_id", 39], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/163/payments Completed 302 Found in 23ms (ActiveRecord: 6.6ms) Started GET "/adherent/members/163/payments" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"163"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "163"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 163]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 82]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 163]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 163]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.9ms | ActiveRecord: 3.6ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 163]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 164]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 164]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 164], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 165]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 165]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 165], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/39/reglements/new" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"39"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "39"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 163]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] CACHE (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 165]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 84]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 164]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 83]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (18.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 17.7ms | ActiveRecord: 5.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 100], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 100], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 100], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 166]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 166]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 166], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/166/payments/new" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"166"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "166"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 100]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 166]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 85]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.9ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/166/payments" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"166"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "166"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 166]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 100]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 166], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 166]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 85]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 85], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["payment_id", 40], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/166/payments Completed 302 Found in 17ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/166/payments" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"166"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "166"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 166]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 85]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 166]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 166]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.2ms | ActiveRecord: 3.6ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 166]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 167]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 167]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 167], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 168]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 168]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 168], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/40/reglements/new" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"40"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "40"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 166]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 167]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 86]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 168]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 87]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (16.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.5ms | ActiveRecord: 5.2ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 101], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 101], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 101], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 169]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 169]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 169], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/169/payments/new" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"169"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "169"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 101]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 169]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 88]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.8ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/169/payments" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"169"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "169"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 101]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 169], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 169]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 88]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 88], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00], ["payment_id", 41], ["updated_at", Sat, 21 Mar 2015 10:12:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/169/payments Completed 302 Found in 20ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/169/payments" for 127.0.0.1 at 2015-03-21 11:12:56 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"169"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "169"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 169]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 88]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.9ms | ActiveRecord: 3.8ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 169]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 170]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 170]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 170], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 171]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 171]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 171], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/41/reglements/new" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"41"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Reglement Load (5.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 170]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 89]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 171]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 90]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (80.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 89ms (Views: 73.8ms | ActiveRecord: 10.5ms) Started POST "/adherent/payments/41/reglements" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"89"}, "commit"=>"Enregistrer", "payment_id"=>"41"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "89"]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 89]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 89], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["payment_id", 41], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]] Redirected to http://www.example.com/adherent/members/169/payments Completed 302 Found in 12ms (ActiveRecord: 4.1ms) Started GET "/adherent/members/169/payments" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"169"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "169"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 169]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 88]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 89]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 170]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 16.5ms | ActiveRecord: 4.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.9ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 102], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 102], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 102], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 172]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 172]]  (1.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 172], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/172/payments/new" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"172"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "172"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 102]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 172]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 91]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.3ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/172/payments" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"172"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "172"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 102]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 172], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 172]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 91]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 91], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["payment_id", 42], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/172/payments Completed 302 Found in 18ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/172/payments" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"172"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "172"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 172]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 91]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.1ms | ActiveRecord: 3.8ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 172]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 173]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 173]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 173], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 174]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 174]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 174], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/42/reglements/new" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"42"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "42"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 174]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 93]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 173]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 92]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (17.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.4ms | ActiveRecord: 4.8ms) Started POST "/adherent/payments/42/reglements" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"92"}, "commit"=>"Enregistrer", "payment_id"=>"42"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "42"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "92"]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 92]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 92], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["payment_id", 42], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Redirected to http://www.example.com/adherent/members/172/payments Completed 302 Found in 12ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/172/payments" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"172"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "172"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 172]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 91]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 92]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 173]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.8ms | ActiveRecord: 4.3ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 103], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 103], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 103], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 175]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 175]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 175], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/175/payments/new" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"175"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "175"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 103]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 175]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 94]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.4ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/175/payments" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"175"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "175"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 103]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 175], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 175]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 94]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 94], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["payment_id", 43], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/175/payments Completed 302 Found in 18ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/175/payments" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"175"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "175"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 175]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 94]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.6ms | ActiveRecord: 3.4ms) Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 175]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 176]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 176]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 176], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 177]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 177]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 177], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/43/reglements/new" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"43"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "43"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 176]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 95]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 177]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 96]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (16.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.7ms | ActiveRecord: 4.7ms) Started POST "/adherent/payments/43/reglements" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"95"}, "commit"=>"Enregistrer", "payment_id"=>"43"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "43"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "95"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 95]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 95], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["payment_id", 43], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Redirected to http://www.example.com/adherent/members/175/payments Completed 302 Found in 12ms (ActiveRecord: 3.7ms) Started GET "/adherent/members/175/payments" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"175"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "175"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 175]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 94]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 95]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 176]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (58.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 85ms (Views: 79.0ms | ActiveRecord: 4.3ms) Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 95]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 176]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 104) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 104) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 104], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 104) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 104) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 104], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 104) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 104) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 104], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 178]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 178]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 178], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/178/payments/new" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"178"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "178"]] Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 104]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 178]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 97]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.3ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/178/payments" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"178"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "178"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 104]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 178], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 178]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 97]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 97], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["payment_id", 44], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/178/payments Completed 302 Found in 18ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/178/payments" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"178"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "178"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 178]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 97]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.6ms | ActiveRecord: 3.8ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 178]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 179]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 179]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 179], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 180]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 180]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 180], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/44/reglements/new" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"44"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "44"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 180]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 99]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 179]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 98]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (16.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 16.1ms | ActiveRecord: 4.7ms) Started POST "/adherent/payments/44/reglements" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"98"}, "commit"=>"Enregistrer", "payment_id"=>"44"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "44"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "98"]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 98]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 98], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["payment_id", 44], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Redirected to http://www.example.com/adherent/members/178/payments Completed 302 Found in 12ms (ActiveRecord: 3.8ms) Started GET "/adherent/members/178/payments" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"178"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "178"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 178]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 97]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 98]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 179]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.7ms | ActiveRecord: 4.3ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 179]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 98]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 105) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 105) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 105], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 105) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 105) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 105], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 105) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 105) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 105], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 181]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 181]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 181], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/181/payments/new" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"181"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "181"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 105]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 181]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 100]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.6ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/181/payments" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"181"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "181"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 105]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 181], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 181]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 100]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 100], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["payment_id", 45], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/181/payments Completed 302 Found in 18ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/181/payments" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"181"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "181"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 181]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 100]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (13.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.6ms | ActiveRecord: 3.6ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 181]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 182]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 182]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 182], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 183]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 183]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 183], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/45/reglements/new" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"45"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "45"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 182]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 101]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 183]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 102]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (17.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.4ms | ActiveRecord: 5.5ms) Started POST "/adherent/payments/45/reglements" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"101"}, "commit"=>"Enregistrer", "payment_id"=>"45"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "45"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "101"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 101]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 101], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00], ["payment_id", 45], ["updated_at", Sat, 21 Mar 2015 10:12:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Redirected to http://www.example.com/adherent/members/181/payments Completed 302 Found in 12ms (ActiveRecord: 4.2ms) Started GET "/adherent/members/181/payments" for 127.0.0.1 at 2015-03-21 11:12:57 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"181"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "181"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 181]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 100]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 101]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 182]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (17.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (20.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 18.3ms | ActiveRecord: 4.8ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 100]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 106) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 106) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 106], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 106) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 106) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 106], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 106) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 106) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 106], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 184]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 184]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 184], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/184/payments/new" for 127.0.0.1 at 2015-03-21 11:12:58 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"184"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "184"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 106]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 184]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 103]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.4ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/184/payments" for 127.0.0.1 at 2015-03-21 11:12:58 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"184"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "184"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 184]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 106]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 184], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 184]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 103]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 103], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["payment_id", 46], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/184/payments Completed 302 Found in 21ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/184/payments" for 127.0.0.1 at 2015-03-21 11:12:58 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"184"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "184"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 184]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 103]] Adherent::Member Load (1.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 184]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Reglement Load (0.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 184]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (17.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.4ms | ActiveRecord: 5.8ms) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 184]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 103]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 107) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 107) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 107], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 107) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 107) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 107], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 107) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 107) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 107], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 187]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 187]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 187], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/187/payments/new" for 127.0.0.1 at 2015-03-21 11:12:58 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"187"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "187"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 107]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 187]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 104]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.4ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/187/payments" for 127.0.0.1 at 2015-03-21 11:12:58 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"187"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "187"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 187]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 107]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 187], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 187]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 104]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 104], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["payment_id", 47], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/187/payments Completed 302 Found in 19ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/187/payments" for 127.0.0.1 at 2015-03-21 11:12:58 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"187"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "187"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 187]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 104]] Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 187]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 187]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.9ms | ActiveRecord: 4.4ms)  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 187]]  (0.6ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 3.9ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 2.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"190"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 190 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 190 [["name", "Dalton"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/190 Completed 302 Found in 13ms (ActiveRecord: 3.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (2.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"191"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/191 Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"192"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/192 Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"193"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.2ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.9ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 119) LIMIT 1 SQL (49.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 119], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/194/coord/new Completed 302 Found in 60ms (ActiveRecord: 52.0ms)  (0.6ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 120) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 120], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/195/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.6ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 121) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 121], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/196/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.3ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x650653a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x6414d5c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["member_id", 197], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["zip", 59000]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 197]]  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 5]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 197]] SQL (0.7ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 197]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.8ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 125) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 125) LIMIT 1 SQL (4.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 125], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/198/coord/new" for 127.0.0.1 at 2015-03-21 11:12:58 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"198"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "198"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 198]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.1ms) Completed 200 OK in 38ms (Views: 33.0ms | ActiveRecord: 1.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/198/coord" for 127.0.0.1 at 2015-03-21 11:12:58 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"198"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "198"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 198]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 198], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/198/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 2.9ms) Started GET "/adherent/members/198/adhesions/new" for 127.0.0.1 at 2015-03-21 11:12:58 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"198"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "198"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 198]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 198]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 15.6ms | ActiveRecord: 1.9ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 126) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 126) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 126], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/199/coord/new" for 127.0.0.1 at 2015-03-21 11:12:58 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"199"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "199"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 199]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 19.0ms | ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 127) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 127) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 127], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/200/coord/new" for 127.0.0.1 at 2015-03-21 11:12:58 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"200"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "200"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 200]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 18.1ms | ActiveRecord: 1.4ms) Started POST "/adherent/members/200/coord" for 127.0.0.1 at 2015-03-21 11:12:58 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"200"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "200"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 200]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 200], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/200/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 3.1ms) Started GET "/adherent/members/200/adhesions/new" for 127.0.0.1 at 2015-03-21 11:12:58 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"200"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "200"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 200]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 200]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (6.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 9.6ms | ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 128) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 128) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 128], ["updated_at", Sat, 21 Mar 2015 10:12:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/201/coord/new" for 127.0.0.1 at 2015-03-21 11:12:58 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"201"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "201"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 201]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (25.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 30.3ms | ActiveRecord: 1.3ms) Started POST "/adherent/members/201/coord" for 127.0.0.1 at 2015-03-21 11:12:59 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"201"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "201"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 201]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 201], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/201/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 2.7ms) Started GET "/adherent/members/201/adhesions/new" for 127.0.0.1 at 2015-03-21 11:12:59 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"201"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "201"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 201]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 201]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.6ms | ActiveRecord: 2.0ms) Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 201]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 129) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 129) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 129], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 202], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/202/adhesions" for 127.0.0.1 at 2015-03-21 11:12:59 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"202"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "202"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 202]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 202]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 105]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 105]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.4ms | ActiveRecord: 2.8ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 130) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 130) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 130], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 203], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/203/adhesions" for 127.0.0.1 at 2015-03-21 11:12:59 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"203"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "203"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 203]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 203]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 106]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 106]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 7.5ms | ActiveRecord: 2.2ms) Started GET "/adherent/members/203/payments/new" for 127.0.0.1 at 2015-03-21 11:12:59 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"203"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "203"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 130]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 203]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 106]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 18.4ms | ActiveRecord: 2.1ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 131) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 131) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 131], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 204], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/204/adhesions" for 127.0.0.1 at 2015-03-21 11:12:59 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"204"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "204"]] Adherent::Adhesion Exists (0.3ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 204]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 204]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 107]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 107]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 2.2ms) Started GET "/adherent/members/204/adhesions/107/edit" for 127.0.0.1 at 2015-03-21 11:12:59 +0100 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"204", "id"=>"107"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "204"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 204], ["id", "107"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (6.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.8ms | ActiveRecord: 1.7ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 132) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 132) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 132], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/205/adhesions/new" for 127.0.0.1 at 2015-03-21 11:12:59 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"205"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "205"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 205]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 205]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.3ms | ActiveRecord: 1.9ms)  (1.9ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 205]] Started POST "/adherent/members/205/adhesions" for 127.0.0.1 at 2015-03-21 11:12:59 +0100 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"205"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "205"]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 205], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/205/adhesions Completed 302 Found in 9ms (ActiveRecord: 2.4ms) Started GET "/adherent/members/205/adhesions" for 127.0.0.1 at 2015-03-21 11:12:59 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"205"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "205"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 205]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 205]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 108]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 108]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 7.9ms | ActiveRecord: 2.3ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 205]] SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 133) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 133) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 133], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/206/adhesions/new" for 127.0.0.1 at 2015-03-21 11:12:59 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"206"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "206"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 206]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 206]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (6.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.2ms | ActiveRecord: 1.5ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.7ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.8ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 207]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 207]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 207], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 207]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 207]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 208]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 208]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 208], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 208]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 208]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 209]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 209]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 209], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 209]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 209]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6546f7c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6546f7c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x655629c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x656ec02 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6585894 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 2.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x659911e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x659911e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x6521f88 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6521f88%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x65c1c18 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.0ms | ActiveRecord: 2.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x6629408 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6629408%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x6643240 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6643240%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 70ms (ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x4b7c1aa @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x57438e4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x58cf802 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5bc82de @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (51.2ms) COMMIT Adherent::Member Exists (2.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 147) LIMIT 1  (0.9ms) BEGIN Adherent::Member Exists (1.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 147) LIMIT 1 SQL (2.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 147], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (2.4ms) COMMIT Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 147) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 147) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 147], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 147) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 147) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 147], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 147) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 147) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 147], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 147) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 147) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 147], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 213]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 213]]  (0.3ms) BEGIN SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 213], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:12:59 UTC +00:00]]  (1.3ms) COMMIT Started GET "/adherent/members/213/adhesions" for 127.0.0.1 at 2015-03-21 11:13:04 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"213"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "213"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 213]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 213]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 112]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 112]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 38ms (Views: 16.0ms | ActiveRecord: 13.8ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-03-21 11:13:05 +0100 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-03-21 11:13:05 +0100 Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-03-21 11:13:05 +0100 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-03-21 11:13:05 +0100 Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-03-21 11:13:05 +0100 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-03-21 11:13:05 +0100 Started DELETE "/adherent/members/213/adhesions/112" for 127.0.0.1 at 2015-03-21 11:13:06 +0100 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"213", "id"=>"112"} Organism Load (2.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (7.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "213"]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 213], ["id", "112"]]  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 112]]  (122.9ms) COMMIT Redirected to http://127.0.0.1:50961/adherent/members/213/adhesions Completed 302 Found in 157ms (ActiveRecord: 144.4ms) Started GET "/adherent/members/213/adhesions" for 127.0.0.1 at 2015-03-21 11:13:06 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"213"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "213"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 213]] Redirected to http://127.0.0.1:50961/adherent/members/213/adhesions/new Completed 302 Found in 7ms (ActiveRecord: 2.0ms) Started GET "/adherent/members/213/adhesions/new" for 127.0.0.1 at 2015-03-21 11:13:06 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"213"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "213"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 213]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 213]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 14.3ms | ActiveRecord: 2.4ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-03-21 11:13:06 +0100  (0.5ms) SELECT COUNT(*) FROM "adherent_adhesions"  (0.6ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (1.9ms) select table_name from information_schema.views where table_schema = 'adh_test'  (186.7ms) TRUNCATE TABLE "adherent_coords", "adherent_members", "adherent_adhesions", "organisms", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (1.0ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.1ms) BEGIN SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:07 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:07 UTC +00:00]]  (103.6ms) COMMIT Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (1.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:13:07 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:13:07 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:13:07 UTC +00:00]]  (2.2ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:13:07 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:13:07 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:13:07 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (1.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 49ms (Views: 34.1ms | ActiveRecord: 11.7ms) Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-03-21 11:13:07 +0100 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-03-21 11:13:07 +0100 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-03-21 11:13:07 +0100 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-03-21 11:13:08 +0100 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-03-21 11:13:08 +0100 Started GET "/assets/forward_disabled.png" for 127.0.0.1 at 2015-03-21 11:13:08 +0100 Started GET "/assets/back_disabled.png" for 127.0.0.1 at 2015-03-21 11:13:08 +0100 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2015-03-21 11:13:09 +0100 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (2.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.1ms) BEGIN Adherent::Coord Load (1.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (2.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] SQL (1.5ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (161.3ms) COMMIT Redirected to http://127.0.0.1:50961/adherent/members Completed 302 Found in 182ms (ActiveRecord: 169.6ms) Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:13:09 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 24.7ms | ActiveRecord: 5.9ms)  (1.1ms) SELECT COUNT(*) FROM "adherent_members"  (1.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (3.6ms) select table_name from information_schema.views where table_schema = 'adh_test'  (151.0ms) TRUNCATE TABLE "adherent_members", "adherent_adhesions", "adherent_coords", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.6ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (1.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:10 UTC +00:00]]  (102.6ms) COMMIT Adherent::Member Exists (5.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.6ms) BEGIN Adherent::Member Exists (2.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:13:10 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:13:10 UTC +00:00]]  (2.2ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:13:10 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:13:10 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:13:10 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) BEGIN Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:10 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Sat, 21 Mar 2015 10:13:10 UTC +00:00]] Adherent::Adhesion Load (2.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (1.5ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-03-21 11:13:10 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (4.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 1]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 51ms (Views: 25.6ms | ActiveRecord: 18.7ms) Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-03-21 11:13:10 +0100 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-03-21 11:13:10 +0100 Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-03-21 11:13:10 +0100 Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-03-21 11:13:11 +0100 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (6.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] SQL (1.9ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (128.3ms) COMMIT Redirected to http://127.0.0.1:50961/adherent/members/1/payments Completed 302 Found in 148ms (ActiveRecord: 138.8ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2015-03-21 11:13:11 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (2.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 9.2ms | ActiveRecord: 4.9ms)  (2.1ms) SELECT COUNT(*) FROM "adherent_payments"  (1.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (3.6ms) select table_name from information_schema.views where table_schema = 'adh_test'  (181.5ms) TRUNCATE TABLE "adherent_members", "adherent_adhesions", "adherent_coords", "adherent_reglements", "organisms", "adherent_payments" RESTART IDENTITY CASCADE;  (0.6ms) ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (2.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (2.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 1], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (2.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 1], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] SQL (1.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 1], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 2], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 2], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 2]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 2]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 2], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 2]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 2]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 2], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 3], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00], ["payment_id", 2], ["updated_at", Sat, 21 Mar 2015 10:13:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 3], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 3]] Adherent::Adhesion Load (1.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 3]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 3], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 3]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 3]]  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (2.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 4], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 4]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 4], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 4]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 4]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (1.1ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 5], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 5], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 5]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 5], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 5]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 5], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 9], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["payment_id", 3], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 10], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["payment_id", 3], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (1.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 6], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 6], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 6], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 6], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 6], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:13:13 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 6]]  (2.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 6]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 6]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 7]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 8]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 9]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 9]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 10]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 41ms (Views: 29.4ms | ActiveRecord: 10.3ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 7], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 7], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 7], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 7], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 7], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:13:13 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 7]]  (1.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 11]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 12]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 12]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 13]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 13]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 14]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 15]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39ms (Views: 26.9ms | ActiveRecord: 10.1ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.7ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 8], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 8], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 8], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 8], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 8], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2015-03-21 11:13:13 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 15.6ms | ActiveRecord: 0.5ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2015-03-21 11:13:13 +0100 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 8], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/21/coord/new Completed 302 Found in 10ms (ActiveRecord: 2.9ms) Started GET "/adherent/members/21/coord/new" for 127.0.0.1 at 2015-03-21 11:13:13 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"21"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "21"]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 19.1ms | ActiveRecord: 3.1ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 9], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 9], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 9], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 9], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 9], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:13:13 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 9]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 22]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 22]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 23]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 23]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 24]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 24]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 25]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 25]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 26]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 26.6ms | ActiveRecord: 6.3ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/22/coord" for 127.0.0.1 at 2015-03-21 11:13:13 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"22"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "22"]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 22]] Redirected to http://www.example.com/adherent/members/22/coord/new Completed 302 Found in 8ms (ActiveRecord: 2.2ms) Started GET "/adherent/members/22/coord/new" for 127.0.0.1 at 2015-03-21 11:13:13 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"22"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "22"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 20.3ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 10], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 10], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 10], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 10], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 10], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:13:13 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 10]]  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 27]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 27]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 28]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 28]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 29]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 29]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 30]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 30]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 31]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 25.3ms | ActiveRecord: 7.1ms) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 27]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 27]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 27], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/27/adhesions" for 127.0.0.1 at 2015-03-21 11:13:13 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"27"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "27"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 27]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 27]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 8.3ms | ActiveRecord: 2.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 11], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 11], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 11], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 11], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 11], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:13:13 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 11]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 32]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 32]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 33]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 33]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 34]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 34]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 35]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 35]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 36]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 36]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 24.6ms | ActiveRecord: 5.9ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/32/edit" for 127.0.0.1 at 2015-03-21 11:13:13 +0100 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"32"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 13.5ms | ActiveRecord: 1.2ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 12], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 12], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 12], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 12], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 12], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:13:13 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 12]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 37]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 37]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 38]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 38]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 39]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 39]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 40]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 40]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 41]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 41]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 24.0ms | ActiveRecord: 6.0ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["member_id", 37], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 37]] Started GET "/adherent/members/37/coord" for 127.0.0.1 at 2015-03-21 11:13:13 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"37"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "37"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 10ms (Views: 5.8ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 13], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 13], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 13], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 13], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 13], ["updated_at", Sat, 21 Mar 2015 10:13:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:13:13 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 13]]  (1.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 42]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 42]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 43]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 43]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 44]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 45]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 45]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 46]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 46]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 38ms (Views: 28.0ms | ActiveRecord: 8.5ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/42/payments" for 127.0.0.1 at 2015-03-21 11:13:14 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"42"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "42"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 42]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 9ms (Views: 5.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (6.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:13:14 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 14]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 47]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 47]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 48]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 48]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 49]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 49]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 50]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 50]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 51]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 51]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 26.3ms | ActiveRecord: 6.1ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2015-03-21 11:13:14 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 14.3ms | ActiveRecord: 0.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:13:14 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 15]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 52]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 52]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 53]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 53]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 54]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 54]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 55]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 55]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 56]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 56]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.7ms) Completed 200 OK in 32ms (Views: 25.4ms | ActiveRecord: 5.1ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/52/adhesions" for 127.0.0.1 at 2015-03-21 11:13:14 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"52"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "52"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 52]] Redirected to http://www.example.com/adherent/members/52/adhesions/new Completed 302 Found in 8ms (ActiveRecord: 2.3ms) Started GET "/adherent/members/52/adhesions/new" for 127.0.0.1 at 2015-03-21 11:13:14 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"52"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "52"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 52]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 52]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.6ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x642288a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.4ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x643b0b0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64809ee @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64998c2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x64988a0 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x64aebc8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x64aebc8%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x64c70c4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x64c70c4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x64dcc12 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 3.4ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 24], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 57], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 58], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 58]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 24]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 58], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 58]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 13], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["payment_id", 4], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 57]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 24]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 57], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 57]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 12], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["payment_id", 5], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (1.9ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 25], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 59], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 60], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 60]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 25]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 60], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 60]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 15], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["payment_id", 6], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 26], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 61], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 62], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 62]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 26]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 62], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 62]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 17], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 62]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 26]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 62], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 62]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 17], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 61]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 26]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 61], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 61]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 16], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.5ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 18], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 19], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 20], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x6741ae8 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6741b10%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 7ms (ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x675070a @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.3ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x676534e @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 63]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 63]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 63], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 63]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 30]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 63], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 63]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/63/payments" for 127.0.0.1 at 2015-03-21 11:13:14 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"63"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "63"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 63]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 63]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.9ms | ActiveRecord: 5.0ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 64]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 64]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 64], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 64]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 31]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 64], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 64]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/64/payments" for 127.0.0.1 at 2015-03-21 11:13:14 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"64"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "64"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 64]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 64]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.1ms | ActiveRecord: 4.0ms) Started GET "/adherent/payments/11/reglements/new" for 127.0.0.1 at 2015-03-21 11:13:14 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"11"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 64]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 16.0ms | ActiveRecord: 5.0ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 32], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 65]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 65]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 65], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/65/payments/new" for 127.0.0.1 at 2015-03-21 11:13:15 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"65"} Organism Load (6.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "65"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 65]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 13.4ms | ActiveRecord: 8.6ms)  (1.0ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 65]] Started POST "/adherent/members/65/payments" for 127.0.0.1 at 2015-03-21 11:13:15 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"65"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "65"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 65]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 32]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 65], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 65]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/65/payments Completed 302 Found in 16ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/65/payments" for 127.0.0.1 at 2015-03-21 11:13:15 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"65"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "65"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 65]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 65]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.0ms | ActiveRecord: 5.0ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 65]] SQL (0.7ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 66]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 66]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 66], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/66/payments/new" for 127.0.0.1 at 2015-03-21 11:13:15 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"66"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "66"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 66]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.7ms | ActiveRecord: 1.8ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 67]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 67]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 67], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 67]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 34]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 67], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 67]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/67/payments/13" for 127.0.0.1 at 2015-03-21 11:13:15 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"67", "id"=>"13"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "67"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 13 LIMIT 1 [["member_id", 67]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 67]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 15.7ms | ActiveRecord: 5.5ms) SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 35], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 68]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 68]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 68], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 68]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 35]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 68], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 68]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/68/payments/14" for 127.0.0.1 at 2015-03-21 11:13:15 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"68", "id"=>"14"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 14 LIMIT 1 [["member_id", 68]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 68]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.8ms | ActiveRecord: 4.8ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 36], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 69]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 69]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 69], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.9ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 69]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 36]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 69], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 69]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/69/payments/15" for 127.0.0.1 at 2015-03-21 11:13:15 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"69", "id"=>"15"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "69"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 15 LIMIT 1 [["member_id", 69]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 69]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 17.5ms | ActiveRecord: 4.5ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 37], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 70]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 70]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 70], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/70/payments/new" for 127.0.0.1 at 2015-03-21 11:13:15 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"70"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 37]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 70]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.0ms | ActiveRecord: 2.2ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 38], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 71]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 71]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 71], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/71/payments/new" for 127.0.0.1 at 2015-03-21 11:13:15 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"71"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 71]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.0ms | ActiveRecord: 1.7ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x65d70e0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6634a42 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6648510 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x..fdb003f42 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x..fdb00f55e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x..fdb00f55e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 7ms (ActiveRecord: 2.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x66ad5b4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x66ad5b4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x66db220 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x66db220%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x66e5b12 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.7ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x66ec098 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.1ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x66f6368 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6701c04 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:13:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.3ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5b84f70 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (6.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/edit.html.erb within layouts/adherent/application (0.4ms) Completed 200 OK in 41ms (Views: 8.7ms | ActiveRecord: 12.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5d1165e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (2.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.1ms | ActiveRecord: 3.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x4d4c55c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x52fcd62 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.5ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x541fa32 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x541fa32%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x570de6a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x570de6a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5796f58 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x580378e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5b81b86 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5b81b86%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5bb0b5c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5bb0b5c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5bde3ae @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5c02254 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5c02254%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5c2b9c4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (1.0ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 63], ["updated_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 72], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/72/adhesions" for 127.0.0.1 at 2015-03-21 11:17:11 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"72"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "72"]] Adherent::Adhesion Exists (0.9ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 72]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 72]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (44.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.4ms) Completed 200 OK in 86ms (Views: 73.4ms | ActiveRecord: 6.8ms) SQL (1.2ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 64], ["updated_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 73], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:17:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/73/adhesions" for 127.0.0.1 at 2015-03-21 11:17:11 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"73"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "73"]] Adherent::Adhesion Exists (1.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 73]] Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 73]]  (1.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 73ms (Views: 65.5ms | ActiveRecord: 5.5ms) Started GET "/adherent/members/73/payments/new" for 127.0.0.1 at 2015-03-21 11:17:11 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"73"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "73"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 64]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 73]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (38.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 80ms (Views: 47.0ms | ActiveRecord: 7.4ms) SQL (0.9ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 65], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 74], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/74/adhesions" for 127.0.0.1 at 2015-03-21 11:17:12 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"74"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "74"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 74]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 74]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 8.2ms | ActiveRecord: 2.5ms) Started GET "/adherent/members/74/adhesions/32/edit" for 127.0.0.1 at 2015-03-21 11:17:12 +0100 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"74", "id"=>"32"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "74"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 74], ["id", "32"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 15.1ms | ActiveRecord: 1.8ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 66], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/75/adhesions/new" for 127.0.0.1 at 2015-03-21 11:17:12 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"75"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "75"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 75]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 75]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.6ms | ActiveRecord: 2.3ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 75]] Started POST "/adherent/members/75/adhesions" for 127.0.0.1 at 2015-03-21 11:17:12 +0100 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"75"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "75"]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 75], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/75/adhesions Completed 302 Found in 10ms (ActiveRecord: 2.4ms) Started GET "/adherent/members/75/adhesions" for 127.0.0.1 at 2015-03-21 11:17:12 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"75"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "75"]] Adherent::Adhesion Exists (0.3ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 75]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 75]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] CACHE (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 8.6ms | ActiveRecord: 2.4ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 75]] SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 67], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/76/adhesions/new" for 127.0.0.1 at 2015-03-21 11:17:12 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"76"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "76"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 76]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 76]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.4ms | ActiveRecord: 2.0ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x4ad3da2 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x4ad3ee2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5276014 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 3.2ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5416284 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 71], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 77]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 77]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 77], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/77/payments/new" for 127.0.0.1 at 2015-03-21 11:17:12 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"77"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "77"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 71]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 77]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.7ms | ActiveRecord: 2.0ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 72) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 72) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 72], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 78]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 78]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 78], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/78/payments/new" for 127.0.0.1 at 2015-03-21 11:17:12 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"78"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "78"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 72]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 78]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.8ms | ActiveRecord: 2.0ms) SQL (2.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 73) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 73) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 73], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 79]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 79]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 79], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 79]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 73]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 79], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 79]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/79/payments/16" for 127.0.0.1 at 2015-03-21 11:17:12 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"79", "id"=>"16"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "79"]] Adherent::Payment Load (1.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 16 LIMIT 1 [["member_id", 79]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 79]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 36ms (Views: 23.4ms | ActiveRecord: 5.5ms) SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 74) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 74) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 74], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 80]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 80]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 80], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 80]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 74]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 80], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 80]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/80/payments/17" for 127.0.0.1 at 2015-03-21 11:17:12 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"80", "id"=>"17"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "80"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 17 LIMIT 1 [["member_id", 80]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 80]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 10.8ms | ActiveRecord: 4.4ms) SQL (0.7ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 75) LIMIT 1  (0.9ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 75) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 75], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 81]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 81]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 81], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 81]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 75]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 81], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 81]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/81/payments/18" for 127.0.0.1 at 2015-03-21 11:17:12 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"81", "id"=>"18"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "81"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 18 LIMIT 1 [["member_id", 81]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 81]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.6ms | ActiveRecord: 4.3ms) SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 76) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 76) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 76], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 82]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 82]]  (1.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 82], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 82]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 76]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 82], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 82]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/82/payments" for 127.0.0.1 at 2015-03-21 11:17:12 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"82"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "82"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 82]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 82]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 17.7ms | ActiveRecord: 4.3ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 77) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 77) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 77], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 83]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 83]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 83], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 83]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 77]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 83], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 83]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/83/payments" for 127.0.0.1 at 2015-03-21 11:17:12 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"83"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "83"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 83]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 83]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.1ms | ActiveRecord: 3.4ms) Started GET "/adherent/payments/20/reglements/new" for 127.0.0.1 at 2015-03-21 11:17:12 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"20"} Organism Load (5.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "20"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 83]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 38ms (Views: 16.9ms | ActiveRecord: 9.5ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 78) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 78) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 78], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 84]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 84]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 84], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/84/payments/new" for 127.0.0.1 at 2015-03-21 11:17:12 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"84"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "84"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 78]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 84]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.5ms | ActiveRecord: 1.8ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 84]] Started POST "/adherent/members/84/payments" for 127.0.0.1 at 2015-03-21 11:17:12 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"84"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "84"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 84]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 78]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 84], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 84]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/84/payments Completed 302 Found in 15ms (ActiveRecord: 3.9ms) Started GET "/adherent/members/84/payments" for 127.0.0.1 at 2015-03-21 11:17:12 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"84"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "84"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 84]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 84]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.7ms | ActiveRecord: 3.6ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 84]] SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 79) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 79) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 79], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 85]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 85]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 85], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/85/payments/new" for 127.0.0.1 at 2015-03-21 11:17:12 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"85"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "85"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 79]] Adherent::Adhesion Load (0.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 85]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.0ms | ActiveRecord: 1.8ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 86]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 86]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 86], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 86]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 86]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 87]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 87]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 87], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 87]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 87]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 88]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 88]]  (0.8ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 88], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 88]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 88]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00]]  (120.7ms) COMMIT Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 80) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (2.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 80) LIMIT 1 SQL (1.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 80], ["updated_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00]]  (3.4ms) COMMIT Adherent::Member Exists (2.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 80) LIMIT 1  (0.7ms) BEGIN Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 80) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 80], ["updated_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 80) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 80) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 80], ["updated_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 80) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (1.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 80) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 80], ["updated_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 80) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 80) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 80], ["updated_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) BEGIN Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 92]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 80]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 92], ["mode", "Chèque"], ["updated_at", Sat, 21 Mar 2015 10:17:13 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 92]]  (1.6ms) COMMIT Started GET "/adherent/members/92/payments/22" for 127.0.0.1 at 2015-03-21 11:17:18 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"92", "id"=>"22"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "92"]] Adherent::Payment Load (1.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 22 LIMIT 1 [["member_id", 92]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 92]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 50ms (Views: 23.8ms | ActiveRecord: 19.1ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-03-21 11:17:18 +0100 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-03-21 11:17:18 +0100 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-03-21 11:17:18 +0100 Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-03-21 11:17:18 +0100 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-03-21 11:17:18 +0100 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-03-21 11:17:18 +0100 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-03-21 11:17:18 +0100 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-03-21 11:17:18 +0100 Started DELETE "/adherent/members/92/payments/22" for 127.0.0.1 at 2015-03-21 11:17:19 +0100 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"92", "id"=>"22"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "92"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 92], ["id", "22"]]  (0.2ms) BEGIN Adherent::Reglement Load (1.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] SQL (0.6ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 22]]  (206.6ms) COMMIT Redirected to http://127.0.0.1:49105/adherent/members/92/payments Completed 302 Found in 240ms (ActiveRecord: 221.8ms) Started GET "/adherent/members/92/payments" for 127.0.0.1 at 2015-03-21 11:17:19 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"92"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "92"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 92]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 11ms (Views: 7.1ms | ActiveRecord: 1.9ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-03-21 11:17:19 +0100  (1.6ms) SELECT COUNT(*) FROM "adherent_payments"  (2.2ms) ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (4.0ms) select table_name from information_schema.views where table_schema = 'adh_test'  (145.2ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "organisms", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (3.1ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:20 UTC +00:00]]  (38.0ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:20 UTC +00:00]]  (20.4ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:20 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:20 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:20 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:20 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.3ms) BEGIN SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:20 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:20 UTC +00:00]]  (1.5ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-03-21 11:17:20 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (1.0ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 9.8ms | ActiveRecord: 4.7ms) Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-03-21 11:17:21 +0100 Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2015-03-21 11:17:21 +0100 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (4.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (53.1ms) COMMIT Redirected to http://127.0.0.1:49105/adherent/members/1/adhesions Completed 302 Found in 67ms (ActiveRecord: 59.9ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-03-21 11:17:22 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:49105/adherent/members/1/adhesions/new Completed 302 Found in 8ms (ActiveRecord: 1.7ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2015-03-21 11:17:22 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (19.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 37ms (Views: 25.9ms | ActiveRecord: 3.9ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-03-21 11:17:22 +0100  (1.7ms) SELECT COUNT(*) FROM "adherent_adhesions"  (2.1ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (3.0ms) select table_name from information_schema.views where table_schema = 'adh_test'  (107.6ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (1.0ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:23 UTC +00:00]]  (114.9ms) COMMIT Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.8ms) BEGIN Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (3.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:23 UTC +00:00]]  (3.8ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:23 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:23 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:23 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:23 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:17:23 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (1.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]] Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 113ms (Views: 36.2ms | ActiveRecord: 10.3ms) Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-03-21 11:17:23 +0100 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-03-21 11:17:23 +0100 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-03-21 11:17:23 +0100 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-03-21 11:17:23 +0100 Started GET "/assets/back_disabled.png" for 127.0.0.1 at 2015-03-21 11:17:23 +0100 Started GET "/assets/forward_disabled.png" for 127.0.0.1 at 2015-03-21 11:17:23 +0100 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2015-03-21 11:17:24 +0100 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.2ms) BEGIN Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] SQL (0.7ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (64.9ms) COMMIT Redirected to http://127.0.0.1:49105/adherent/members Completed 302 Found in 85ms (ActiveRecord: 70.1ms) Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:17:24 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (1.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 23.3ms | ActiveRecord: 5.3ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_members"  (0.6ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (1.5ms) select table_name from information_schema.views where table_schema = 'adh_test'  (103.8ms) TRUNCATE TABLE "adherent_coords", "adherent_members", "adherent_adhesions", "adherent_reglements", "organisms", "adherent_payments" RESTART IDENTITY CASCADE;  (0.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL  (0.1ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6003bb4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 15ms (Views: 4.1ms | ActiveRecord: 6.6ms)  (0.7ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x602683a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.6ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5f7678c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.4ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5f8b542 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6043138 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6043138%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x605abb2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x605abb2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 7ms (ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x60749c2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.0ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x609591a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x60b88ac @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x60b88ac%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x60d363e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x60e56ea @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (2.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 1.3ms | ActiveRecord: 3.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x615702e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 7ms (ActiveRecord: 1.9ms)  (0.6ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x615f79c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 7ms (ActiveRecord: 2.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (1.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 3.4ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"2"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/2 Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"3"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 3 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 3 [["name", "Dalton"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/3 Completed 302 Found in 12ms (ActiveRecord: 3.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"4"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/4 Completed 302 Found in 6ms (ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.8ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/5/coord/new Completed 302 Found in 11ms (ActiveRecord: 2.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 22], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/6/coord/new Completed 302 Found in 12ms (ActiveRecord: 3.3ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.6ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 24], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/7/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.0ms)  (0.9ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 29], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 29], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 8]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 8]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 8], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/8/payments/new" for 127.0.0.1 at 2015-03-21 11:17:26 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"8"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (76.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 96ms (Views: 80.5ms | ActiveRecord: 8.0ms) Started POST "/adherent/members/8/payments" for 127.0.0.1 at 2015-03-21 11:17:26 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"8"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 8], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 1], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/8/payments Completed 302 Found in 23ms (ActiveRecord: 6.3ms) Started GET "/adherent/members/8/payments" for 127.0.0.1 at 2015-03-21 11:17:26 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"8"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Payment Load (1.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 8]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.6ms | ActiveRecord: 6.8ms) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 30], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 30], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 11]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 11], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/11/payments/new" for 127.0.0.1 at 2015-03-21 11:17:26 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"11"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.0ms | ActiveRecord: 4.0ms) Started POST "/adherent/members/11/payments" for 127.0.0.1 at 2015-03-21 11:17:26 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"11"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 30]] SQL (3.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 11], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 2], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["payment_id", 2], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/11/payments Completed 302 Found in 28ms (ActiveRecord: 9.6ms) Started GET "/adherent/members/11/payments" for 127.0.0.1 at 2015-03-21 11:17:26 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"11"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 11]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 2]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.3ms | ActiveRecord: 4.4ms)  (1.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 31], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 31], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 14]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 14]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 14], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/14/payments/new" for 127.0.0.1 at 2015-03-21 11:17:26 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"14"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.8ms | ActiveRecord: 3.2ms) Started POST "/adherent/members/14/payments" for 127.0.0.1 at 2015-03-21 11:17:26 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"14"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 31]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 14], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] SQL (1.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 3], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["payment_id", 3], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/14/payments Completed 302 Found in 19ms (ActiveRecord: 5.9ms) Started GET "/adherent/members/14/payments" for 127.0.0.1 at 2015-03-21 11:17:26 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"14"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 14]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 3]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.9ms | ActiveRecord: 4.3ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 14]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 15]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 15]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 15], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 16]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 16]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 16], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/3/reglements/new" for 127.0.0.1 at 2015-03-21 11:17:26 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"3"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 17.8ms | ActiveRecord: 5.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 32], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 32], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 32], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 17]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 17]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 17], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/17/payments/new" for 127.0.0.1 at 2015-03-21 11:17:26 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"17"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 14.3ms | ActiveRecord: 3.9ms) Started POST "/adherent/members/17/payments" for 127.0.0.1 at 2015-03-21 11:17:26 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"17"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 32]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 17], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 6], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00], ["payment_id", 4], ["updated_at", Sat, 21 Mar 2015 10:17:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/17/payments Completed 302 Found in 20ms (ActiveRecord: 6.3ms) Started GET "/adherent/members/17/payments" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"17"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 17]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 6]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.1ms | ActiveRecord: 5.3ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 17]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 18]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 18]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 18], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 19]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 19]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 19], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/4/reglements/new" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 18]]  (5.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (93.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 108ms (Views: 91.8ms | ActiveRecord: 10.5ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 33], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 33], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 20]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 20]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 20], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/20/payments/new" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"20"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "20"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 20]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 12.4ms | ActiveRecord: 3.6ms) Started POST "/adherent/members/20/payments" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"20"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "20"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 33]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 20], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 20]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 9], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["payment_id", 5], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/20/payments Completed 302 Found in 20ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/20/payments" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"20"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "20"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 20]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 9]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (27.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 51ms (Views: 34.9ms | ActiveRecord: 5.4ms) Adherent::Payment Load (3.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 20]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 21]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 21]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 21], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 22]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 22]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 22], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/5/reglements/new" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"5"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 21]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 19.1ms | ActiveRecord: 4.6ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 34], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 34], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 23]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 23]]  (0.8ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 23], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/23/payments/new" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"23"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 23]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.2ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/23/payments" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"23"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 34]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 23], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 23]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 12], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["payment_id", 6], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/23/payments Completed 302 Found in 21ms (ActiveRecord: 6.5ms) Started GET "/adherent/members/23/payments" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"23"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 23]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (1.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 12]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.8ms | ActiveRecord: 5.0ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 23]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 24]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 24]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 24], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 25]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 25]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 25], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/6/reglements/new" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"6"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "6"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 16.7ms | ActiveRecord: 6.8ms) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 23]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 23]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 35], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 35], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 35], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 26]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 26]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 26], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/26/payments/new" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"26"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 12.3ms | ActiveRecord: 3.2ms) Started POST "/adherent/members/26/payments" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"26"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 35]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 26], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 15], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/26/payments Completed 302 Found in 18ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/26/payments" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"26"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 26]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.0ms | ActiveRecord: 3.9ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 26]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 27]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 27]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 27], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 28]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 28]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 28], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/7/reglements/new" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"7"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 28]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 27ms (Views: 17.8ms | ActiveRecord: 5.4ms) Started POST "/adherent/payments/7/reglements" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"16"}, "commit"=>"Enregistrer", "payment_id"=>"7"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 16], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Redirected to http://www.example.com/adherent/members/26/payments Completed 302 Found in 14ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/26/payments" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"26"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 26]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (17.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 22.0ms | ActiveRecord: 5.6ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 36], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 36], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (5.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 36], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 29]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 29]]  (1.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 29], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/29/payments/new" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"29"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 29]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.6ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/29/payments" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"29"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 36]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 29], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 29]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] SQL (1.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 18], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/29/payments Completed 302 Found in 22ms (ActiveRecord: 5.6ms) Started GET "/adherent/members/29/payments" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"29"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 29]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.6ms | ActiveRecord: 4.0ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 29]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 30]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 30]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 30], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 31]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 31]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 31], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/8/reglements/new" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"8"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 31]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 30]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 17.3ms | ActiveRecord: 5.4ms) Started POST "/adherent/payments/8/reglements" for 127.0.0.1 at 2015-03-21 11:17:27 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"19"}, "commit"=>"Enregistrer", "payment_id"=>"8"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "19"]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 19], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 21 Mar 2015 10:17:27 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Redirected to http://www.example.com/adherent/members/29/payments Completed 302 Found in 12ms (ActiveRecord: 3.9ms) Started GET "/adherent/members/29/payments" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"29"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 29]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 18.1ms | ActiveRecord: 5.2ms) Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 30]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 37], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 37], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 37], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 32]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 32]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 32], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/32/payments/new" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"32"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 37]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 32]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.6ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/32/payments" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"32"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]]  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 37]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 32], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 32]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 21], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/32/payments Completed 302 Found in 19ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/32/payments" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"32"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 32]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 21]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.8ms | ActiveRecord: 4.6ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 32]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 33]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 33]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 33], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 34]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 34]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 34], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/9/reglements/new" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"9"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 17.1ms | ActiveRecord: 5.4ms) Started POST "/adherent/payments/9/reglements" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"22"}, "commit"=>"Enregistrer", "payment_id"=>"9"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "22"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 22], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Redirected to http://www.example.com/adherent/members/32/payments Completed 302 Found in 13ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/32/payments" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"32"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 32]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 21]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 17.7ms | ActiveRecord: 5.1ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 38], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 38], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 38], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 35]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 35]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 35], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/35/payments/new" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"35"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 35]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.0ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/35/payments" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"35"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 38]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 35], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 35]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 24], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/35/payments Completed 302 Found in 21ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/35/payments" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"35"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 35]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 24]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.3ms | ActiveRecord: 4.2ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 35]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 36]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 36]]  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 36], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 37]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 37]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 37], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/10/reglements/new" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"10"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (83.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 96ms (Views: 86.5ms | ActiveRecord: 4.8ms) Started POST "/adherent/payments/10/reglements" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"25"}, "commit"=>"Enregistrer", "payment_id"=>"10"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "25"]] Adherent::Reglement Load (1.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 25], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Redirected to http://www.example.com/adherent/members/35/payments Completed 302 Found in 14ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/35/payments" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"35"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 35]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 24]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.4ms | ActiveRecord: 4.9ms) Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 39], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 39], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 39], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 38]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 38]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 38], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/38/payments/new" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"38"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 39]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 38]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 20.1ms | ActiveRecord: 1.9ms) Started POST "/adherent/members/38/payments" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"38"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 39]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 38], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 38]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 27], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/38/payments Completed 302 Found in 20ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/38/payments" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"38"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 38]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 15.6ms | ActiveRecord: 3.4ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 38]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 39]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 39]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 39], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 40]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 40]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 40], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/11/reglements/new" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"11"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 39]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 40]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (22.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 43ms (Views: 26.7ms | ActiveRecord: 5.8ms) Started POST "/adherent/payments/11/reglements" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"28"}, "commit"=>"Enregistrer", "payment_id"=>"11"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "28"]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 28], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Redirected to http://www.example.com/adherent/members/38/payments Completed 302 Found in 19ms (ActiveRecord: 6.4ms) Started GET "/adherent/members/38/payments" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"38"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 38]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 39]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 18.6ms | ActiveRecord: 5.1ms)  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 40], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 40], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 40], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 41]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 41]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 41], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/41/payments/new" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"41"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 40]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 41]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.0ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/41/payments" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"41"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 40]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 41], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 41]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 30], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["payment_id", 12], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/41/payments Completed 302 Found in 23ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/41/payments" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"41"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 41]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.7ms | ActiveRecord: 4.4ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 41]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 41], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 41], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 41], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 44]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 44]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 44], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/44/payments/new" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"44"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "44"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 41]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 14.5ms | ActiveRecord: 1.8ms) Started POST "/adherent/members/44/payments" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"44"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "44"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 44]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 41]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 44], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 31], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00], ["payment_id", 13], ["updated_at", Sat, 21 Mar 2015 10:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/44/payments Completed 302 Found in 22ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/44/payments" for 127.0.0.1 at 2015-03-21 11:17:28 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"44"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "44"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 44]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 44]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 44]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 18.3ms | ActiveRecord: 4.4ms)  (1.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 42], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 42], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 42], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 47]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 47]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 47], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/47/payments/new" for 127.0.0.1 at 2015-03-21 11:17:29 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"47"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 42]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 47]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (102.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 117ms (Views: 108.5ms | ActiveRecord: 2.0ms) Started POST "/adherent/members/47/payments" for 127.0.0.1 at 2015-03-21 11:17:29 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"47"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 47]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 42]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 47], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 47]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 32], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["payment_id", 14], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/47/payments Completed 302 Found in 27ms (ActiveRecord: 4.1ms) Started GET "/adherent/members/47/payments" for 127.0.0.1 at 2015-03-21 11:17:29 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"47"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 47]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 47]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 47]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.2ms | ActiveRecord: 5.5ms)  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 47]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 43], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 43], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 43], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 50]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 50]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 50], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/50/payments/new" for 127.0.0.1 at 2015-03-21 11:17:29 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"50"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "50"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 43]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 50]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.1ms | ActiveRecord: 2.0ms) Started POST "/adherent/members/50/payments" for 127.0.0.1 at 2015-03-21 11:17:29 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"50"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "50"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 50]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 43]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 50], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 50]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 33], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["payment_id", 15], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/50/payments Completed 302 Found in 30ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/50/payments" for 127.0.0.1 at 2015-03-21 11:17:29 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"50"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "50"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 50]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 50]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 50]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (22.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 27.8ms | ActiveRecord: 5.0ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.9ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 44], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 44], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 44], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 53]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 53]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 53], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 53]] Started GET "/adherent/members/53/payments/new" for 127.0.0.1 at 2015-03-21 11:17:29 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"53"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "53"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 44]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 53]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 13.3ms | ActiveRecord: 2.0ms) Started POST "/adherent/members/53/payments" for 127.0.0.1 at 2015-03-21 11:17:29 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"53"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "53"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 53]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 44]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 53], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 53]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 34], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["payment_id", 16], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/53/payments Completed 302 Found in 20ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/53/payments" for 127.0.0.1 at 2015-03-21 11:17:29 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"53"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "53"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 53]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 53]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 53]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (24.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40ms (Views: 31.0ms | ActiveRecord: 4.2ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 53]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.7ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 35], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 36], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 37], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.6ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1 SQL (0.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 45], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 45) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 45) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 45], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 56], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 57], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 57]] Organism Load (0.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 45]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 57], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 57]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 39], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["payment_id", 17], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 57]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 45]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 57], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 57]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 39], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["payment_id", 18], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 56]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 45]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 56], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 56]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 38], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 46], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 46], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 58], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 59], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 59]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 46]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 59], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 59]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 41]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 41], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["payment_id", 20], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 58]] Organism Load (0.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 46]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 58], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 58]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 40]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 40], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["payment_id", 21], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 47], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 47], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 60], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 61], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 61]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 47]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 61], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 61]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 43]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 43], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["payment_id", 22], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 48], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 62], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 62]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 62]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 62], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 62]] Organism Load (0.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 48]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 62], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 62]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 44]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 44], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["payment_id", 23], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 45], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["payment_id", 23], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 49], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 63], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 63]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 63]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 63], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_payments"  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 63]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 49]]  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "adherent_payments"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 50], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 64], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:17:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 64]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 64]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 64], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 64]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 50]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 64], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 64]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 48], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["payment_id", 24], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 51], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 65], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 65]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 65]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 65], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 65]] Organism Load (0.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 51]]  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 52], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 66], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 66]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 66]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 66], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 66]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 52]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 66], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 66]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 52]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 52], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["payment_id", 25], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 53]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 53], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["payment_id", 25], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 53], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/67/coord/new" for 127.0.0.1 at 2015-03-21 11:17:30 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"67"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "67"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 67]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (21.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 53ms (Views: 27.3ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/67/coord" for 127.0.0.1 at 2015-03-21 11:17:30 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"67"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "67"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 67]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 67], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/67/adhesions/new Completed 302 Found in 15ms (ActiveRecord: 3.4ms) Started GET "/adherent/members/67/adhesions/new" for 127.0.0.1 at 2015-03-21 11:17:30 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"67"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "67"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 67]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 67]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.4ms | ActiveRecord: 1.7ms) Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 67]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 54], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/68/coord/new" for 127.0.0.1 at 2015-03-21 11:17:30 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"68"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]] Adherent::Coord Load (1.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 68]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (20.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 22.9ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/68/coord" for 127.0.0.1 at 2015-03-21 11:17:30 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"68"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 68]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 68], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/68/adhesions/new Completed 302 Found in 15ms (ActiveRecord: 3.4ms) Started GET "/adherent/members/68/adhesions/new" for 127.0.0.1 at 2015-03-21 11:17:30 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"68"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 68]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 68]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.7ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 55], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/69/coord/new" for 127.0.0.1 at 2015-03-21 11:17:30 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"69"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "69"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 69]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (24.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 27.3ms | ActiveRecord: 3.0ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/69/coord" for 127.0.0.1 at 2015-03-21 11:17:30 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"69"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "69"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 69]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 69], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/69/adhesions/new Completed 302 Found in 12ms (ActiveRecord: 3.9ms) Started GET "/adherent/members/69/adhesions/new" for 127.0.0.1 at 2015-03-21 11:17:30 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"69"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "69"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 69]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 69]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.4ms | ActiveRecord: 1.7ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 56], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/70/coord/new" for 127.0.0.1 at 2015-03-21 11:17:30 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"70"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 70]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 17.8ms | ActiveRecord: 2.9ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["member_id", 71], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["zip", 59000]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 71]]  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 4]] Adherent::Adhesion Load (1.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 71]] SQL (0.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 71]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 3.0ms | ActiveRecord: 2.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 58], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 58], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 58], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 58], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 58], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:17:30 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 58]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 72]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 72]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 73]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 73]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 74]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 74]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 75]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 75]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 76]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 76]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 106ms (Views: 96.2ms | ActiveRecord: 8.6ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 59], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 59], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 59], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 59], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 59], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:17:30 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 59]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 77]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 77]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 78]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 78]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 79]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 79]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 80]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 80]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 81]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 81]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 24.0ms | ActiveRecord: 6.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 60], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 60], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 60], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 60], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 60], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2015-03-21 11:17:30 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (13.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 20.2ms | ActiveRecord: 0.6ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2015-03-21 11:17:30 +0100 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 60], ["updated_at", Sat, 21 Mar 2015 10:17:30 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/87/coord/new Completed 302 Found in 10ms (ActiveRecord: 1.9ms) Started GET "/adherent/members/87/coord/new" for 127.0.0.1 at 2015-03-21 11:17:30 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"87"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "87"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 87]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (21.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 25.6ms | ActiveRecord: 1.3ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_members"  (0.5ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 61], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 61], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 61], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 61], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 61], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:17:31 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 61]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 88]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 88]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 89]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 89]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 90]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 90]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 91]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 91]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 92]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 92]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 24.0ms | ActiveRecord: 7.4ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2015-03-21 11:17:31 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 12.2ms | ActiveRecord: 0.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 62], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 62], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 62], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 62], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 62], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:17:31 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 62]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 93]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 93]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 94]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 94]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 95]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 95]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 96]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 96]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 97]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 97]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 37ms (Views: 29.9ms | ActiveRecord: 5.3ms) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/93/edit" for 127.0.0.1 at 2015-03-21 11:17:31 +0100 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"93"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 14.2ms | ActiveRecord: 1.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 63], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 63], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 63], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 63], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 63], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:17:31 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 63]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 98]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 98]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 99]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 99]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 100]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 100]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 101]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 101]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 102]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 102]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 38ms (Views: 31.0ms | ActiveRecord: 5.7ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/98/adhesions" for 127.0.0.1 at 2015-03-21 11:17:31 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"98"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "98"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 98]] Redirected to http://www.example.com/adherent/members/98/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 2.1ms) Started GET "/adherent/members/98/adhesions/new" for 127.0.0.1 at 2015-03-21 11:17:31 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"98"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "98"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 98]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 98]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (88.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 98ms (Views: 91.6ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 64], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 64], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 64], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 64], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 64], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:17:31 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 64]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 103]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 103]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 104]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 104]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 105]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 105]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 106]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 106]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 107]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 107]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39ms (Views: 31.4ms | ActiveRecord: 5.5ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["member_id", 103], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 103]] Started GET "/adherent/members/103/coord" for 127.0.0.1 at 2015-03-21 11:17:31 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"103"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "103"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 103]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 11ms (Views: 5.8ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 65], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 65], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 65], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 65], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 65], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:17:31 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 65]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 108]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 108]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 109]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 109]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 110]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 110]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 111]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 111]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 112]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 112]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 25.6ms | ActiveRecord: 5.1ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/108/payments" for 127.0.0.1 at 2015-03-21 11:17:31 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"108"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 108]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 8ms (Views: 4.1ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 66], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 66], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 66], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 66], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 66], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:17:31 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 66]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 113]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 113]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 114]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 114]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 115]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 115]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 116]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 116]]  (1.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 117]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 117]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 25.1ms | ActiveRecord: 6.0ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 113]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 113]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 113], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/113/adhesions" for 127.0.0.1 at 2015-03-21 11:17:31 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"113"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "113"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 113]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 113]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 54]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 54]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 6.8ms | ActiveRecord: 3.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 67], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 67], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 67], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 67], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 67], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:17:31 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 67]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 118]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 118]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 119]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 119]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 120]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 120]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 121]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 121]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 122]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 122]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 40ms (Views: 32.0ms | ActiveRecord: 5.0ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/118/coord" for 127.0.0.1 at 2015-03-21 11:17:31 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"118"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "118"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 118]] Redirected to http://www.example.com/adherent/members/118/coord/new Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/adherent/members/118/coord/new" for 127.0.0.1 at 2015-03-21 11:17:31 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"118"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "118"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 118]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 22.2ms | ActiveRecord: 1.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x61e3a60 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x61fcdbc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x61fcdbc%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 7ms (ActiveRecord: 2.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x6219d72 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (6.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6219d72%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 14ms (ActiveRecord: 7.9ms)  (1.8ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x622f064 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x622e204 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.6ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6246f52 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (6.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 2.3ms | ActiveRecord: 7.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x625f5de @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (3.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 1.7ms | ActiveRecord: 5.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6272f6c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:17:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.8ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (5.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:51 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:51 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:50:51 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:51 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 56]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 56], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:51 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:50:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 56]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:51 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 57]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 57], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:51 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:50:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 57]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 57]]  (1.7ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 75) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 75) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 75], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 75) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 75) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 75], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 123], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 124], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 124]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 75]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 124], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]] Adherent::Adhesion Load (2.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 124]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 59], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["payment_id", 26], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 124]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 75]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 124], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 124]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 59], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["payment_id", 27], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 75]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 123], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 123]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 58]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 58], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["payment_id", 28], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 76) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 76) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 76], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 76) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 76) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 76], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 125], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 126], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]] Organism Load (2.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 76]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 126], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 126]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 61]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 61], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["payment_id", 29], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 77) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 77) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 77], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 77) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 77) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 77], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (1.0ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 127], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 128], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 128]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 77]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 128], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 128]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 63]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 63], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["payment_id", 30], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 77]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 127], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 127]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 62], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["payment_id", 31], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x568adee @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (0.4ms) Completed 200 OK in 17ms (Views: 11.2ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x56ec3dc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x56ec3dc%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5711d6c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5711d6c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x572c78e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x57462e2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5762ea6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x577f722 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x577e00c @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.9ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["member_id", 129], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["zip", 59000]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 129]]  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 6]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 129]] SQL (0.5ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 129]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 85) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 85) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 85], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/130/adhesions/new" for 127.0.0.1 at 2015-03-21 11:50:52 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"130"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "130"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 130]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 130]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (87.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (24.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.3ms) Completed 200 OK in 133ms (Views: 126.7ms | ActiveRecord: 2.1ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 86) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 86) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 86], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/131/adhesions/new" for 127.0.0.1 at 2015-03-21 11:50:52 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"131"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "131"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 131]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 131]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 10.7ms | ActiveRecord: 2.1ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 131]] Started POST "/adherent/members/131/adhesions" for 127.0.0.1 at 2015-03-21 11:50:52 +0100 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"131"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "131"]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 131], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/131/adhesions Completed 302 Found in 10ms (ActiveRecord: 2.3ms) Started GET "/adherent/members/131/adhesions" for 127.0.0.1 at 2015-03-21 11:50:52 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"131"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "131"]] Adherent::Adhesion Exists (0.9ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 131]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 131]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 64]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 64]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.2ms | ActiveRecord: 3.3ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 131]] SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 87) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 87], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 132], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/132/adhesions" for 127.0.0.1 at 2015-03-21 11:50:52 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"132"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 132]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 132]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 8.5ms | ActiveRecord: 2.6ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 88], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 133], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/133/adhesions" for 127.0.0.1 at 2015-03-21 11:50:52 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"133"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "133"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 133]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 133]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 66]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 66]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 8.5ms | ActiveRecord: 2.9ms) Started GET "/adherent/members/133/adhesions/66/edit" for 127.0.0.1 at 2015-03-21 11:50:52 +0100 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"133", "id"=>"66"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "133"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 133], ["id", "66"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 11.4ms | ActiveRecord: 1.7ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 89) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 89) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 89], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 134], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/134/adhesions" for 127.0.0.1 at 2015-03-21 11:50:52 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"134"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "134"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 134]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 134]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 67]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 67]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 8.4ms | ActiveRecord: 2.2ms) Started GET "/adherent/members/134/payments/new" for 127.0.0.1 at 2015-03-21 11:50:52 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"134"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "134"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 89]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 134]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 67]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (15.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 21.4ms | ActiveRecord: 2.5ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 90) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 90) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 90], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 135]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 135]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 135], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/135/payments/new" for 127.0.0.1 at 2015-03-21 11:50:52 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"135"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "135"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 90]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 135]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.5ms | ActiveRecord: 1.8ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 91) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 91) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 91], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 136]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 136]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 136], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/136/payments/new" for 127.0.0.1 at 2015-03-21 11:50:53 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"136"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "136"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 91]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 136]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (71.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 81ms (Views: 74.6ms | ActiveRecord: 1.6ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 92) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 92) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 92], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 137]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 137]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 137], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/137/payments/new" for 127.0.0.1 at 2015-03-21 11:50:53 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"137"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "137"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 92]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 137]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.6ms | ActiveRecord: 1.9ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 93], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 138]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 138]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 138], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/138/payments/new" for 127.0.0.1 at 2015-03-21 11:50:53 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"138"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "138"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 93]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 138]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.4ms | ActiveRecord: 2.0ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 138]] Started POST "/adherent/members/138/payments" for 127.0.0.1 at 2015-03-21 11:50:53 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"138"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "138"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 93]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 138], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 138]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/138/payments Completed 302 Found in 14ms (ActiveRecord: 3.7ms) Started GET "/adherent/members/138/payments" for 127.0.0.1 at 2015-03-21 11:50:53 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"138"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "138"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 138]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 19.1ms | ActiveRecord: 4.4ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 138]] SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 94) LIMIT 1  (1.0ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 94) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 94], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 139]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 139]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 139], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 139]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 94]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 139], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 139]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/139/payments" for 127.0.0.1 at 2015-03-21 11:50:53 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"139"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "139"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 139]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 139]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.7ms | ActiveRecord: 3.7ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 95], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 140]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 140]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 140], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 140]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 95]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 140], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 140]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/140/payments" for 127.0.0.1 at 2015-03-21 11:50:53 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"140"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "140"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 140]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 140]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.3ms | ActiveRecord: 3.5ms) Started GET "/adherent/payments/34/reglements/new" for 127.0.0.1 at 2015-03-21 11:50:53 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"34"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "34"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 140]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 18.3ms | ActiveRecord: 3.9ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (1.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 96], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 141]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 141]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 141], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 96]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 141], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 141]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/141/payments/35" for 127.0.0.1 at 2015-03-21 11:50:53 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"141", "id"=>"35"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "141"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 35 LIMIT 1 [["member_id", 141]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (6.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 20.4ms | ActiveRecord: 4.2ms) SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 97], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 142]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 142]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 142], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 97]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 142], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 142]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/142/payments/36" for 127.0.0.1 at 2015-03-21 11:50:53 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"142", "id"=>"36"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "142"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 36 LIMIT 1 [["member_id", 142]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.3ms | ActiveRecord: 4.7ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.7ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 98], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 143]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 143]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 143], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 143]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 98]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 143], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 143]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/143/payments/37" for 127.0.0.1 at 2015-03-21 11:50:53 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"143", "id"=>"37"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "143"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 37 LIMIT 1 [["member_id", 143]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 143]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.2ms | ActiveRecord: 3.5ms) SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x488b4f0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 3.1ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x4e515d8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x4e515d8%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 7ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x4f587a6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x4f587a6%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (1.1ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x523b66c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x52b279e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x55f21a2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x56071e2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x56071e2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x5623c0c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x564b9c8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x566a36e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x568ad94 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 110) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 110) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 110], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/144/coord/new" for 127.0.0.1 at 2015-03-21 11:50:53 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"144"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "144"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 144]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 22.5ms | ActiveRecord: 1.8ms) Started POST "/adherent/members/144/coord" for 127.0.0.1 at 2015-03-21 11:50:53 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"144"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "144"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 144]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 144], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/144/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 3.2ms) Started GET "/adherent/members/144/adhesions/new" for 127.0.0.1 at 2015-03-21 11:50:53 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"144"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "144"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 144]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 144]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.1ms | ActiveRecord: 1.8ms) Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 144]]  (0.5ms) ROLLBACK  (0.2ms) BEGIN SQL (0.9ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 111) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 111) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 111], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/145/coord/new" for 127.0.0.1 at 2015-03-21 11:50:53 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"145"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "145"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 145]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 19.0ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 112) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 112) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 112], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/146/coord/new" for 127.0.0.1 at 2015-03-21 11:50:53 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"146"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "146"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 146]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 18.3ms | ActiveRecord: 1.6ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/146/coord" for 127.0.0.1 at 2015-03-21 11:50:53 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"146"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "146"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 146]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 146], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 10:50:53 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/146/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 2.4ms) Started GET "/adherent/members/146/adhesions/new" for 127.0.0.1 at 2015-03-21 11:50:53 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"146"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "146"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 146]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 146]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (70.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 79ms (Views: 73.4ms | ActiveRecord: 1.9ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 113) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 113) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 113], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/147/coord/new" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"147"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "147"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 147]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 20.3ms | ActiveRecord: 1.4ms) Started POST "/adherent/members/147/coord" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"147"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "147"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 147]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 147], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/147/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 2.6ms) Started GET "/adherent/members/147/adhesions/new" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"147"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "147"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 147]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 147]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (6.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.5ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 3.4ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 115) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 115) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 115], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 115) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 115) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 115], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 115) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 115) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 115], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 148]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 148]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 148], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/148/payments/new" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"148"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "148"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 115]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 148]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 77]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.1ms) Completed 200 OK in 34ms (Views: 26.0ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/148/payments" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"148"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "148"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 148]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 115]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 148], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 148]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 77]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 77], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["payment_id", 38], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/148/payments Completed 302 Found in 19ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/148/payments" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"148"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "148"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 148]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 77]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 148]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 148]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 22.9ms | ActiveRecord: 4.6ms)  (1.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 148]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 116) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 116) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 116], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 116) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 116) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 116], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 116) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 116) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 116], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 151]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 151]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 151], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/151/payments/new" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"151"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "151"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 116]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 151]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 78]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.4ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/151/payments" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"151"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "151"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 151]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 116]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 151], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 151]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 78]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 78], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["payment_id", 39], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/151/payments Completed 302 Found in 19ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/151/payments" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"151"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "151"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 151]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 78]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 151]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 151]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.6ms | ActiveRecord: 4.0ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 151]]  (65.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 78]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 117) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 117) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 117], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 117) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 117) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 117], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 117) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 117) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 117], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 154]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 154]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 154], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/154/payments/new" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"154"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "154"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 117]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 154]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 79]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.9ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/154/payments" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"154"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "154"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 117]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 154], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 154]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 79]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 79], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["payment_id", 40], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/154/payments Completed 302 Found in 19ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/154/payments" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"154"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "154"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 154]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 79]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.4ms | ActiveRecord: 4.3ms)  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 154]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 118) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 118) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 118], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 118) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 118) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 118], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 118) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 118) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 118], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 157]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 157]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 157], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 157]] Started GET "/adherent/members/157/payments/new" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"157"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "157"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 118]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 157]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 80]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.1ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/157/payments" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"157"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "157"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 118]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 157], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 157]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 80]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 80], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["payment_id", 41], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/157/payments Completed 302 Found in 19ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/157/payments" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"157"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "157"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 157]] Adherent::Reglement Load (1.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 80]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] CACHE (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.5ms | ActiveRecord: 5.2ms)  (0.3ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 157]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 119) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 119) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 119], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 119) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 119) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 119], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 119) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 119) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 119], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 160]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 160]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 160], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/160/payments/new" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"160"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "160"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 119]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 160]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 81]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.6ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/160/payments" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"160"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "160"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 160]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 119]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 160], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 160]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 81]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 81], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["payment_id", 42], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/160/payments Completed 302 Found in 19ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/160/payments" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"160"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "160"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 160]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 81]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 160]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Reglement Load (1.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 160]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.3ms | ActiveRecord: 5.6ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 120) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 120) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 120], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 120) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 120) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 120], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 120) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 120) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 120], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 163]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 163]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 163], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/163/payments/new" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"163"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "163"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 120]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 163]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 82]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.4ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/163/payments" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"163"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "163"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 163]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 120]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 163], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 163]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 82]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 82], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["payment_id", 43], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/163/payments Completed 302 Found in 18ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/163/payments" for 127.0.0.1 at 2015-03-21 11:50:54 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"163"} Organism Load (4.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "163"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 163]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 82]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 163]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 163]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 14.5ms | ActiveRecord: 8.8ms)  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 163]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 121) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 121) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 121], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 121) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 121) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 121], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 121) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 121) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 121], ["updated_at", Sat, 21 Mar 2015 10:50:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 166]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 166]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 166], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/166/payments/new" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"166"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "166"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 121]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 166]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 83]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.6ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/166/payments" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"166"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "166"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 166]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 121]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 166], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 166]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 83]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 83], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["payment_id", 44], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/166/payments Completed 302 Found in 18ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/166/payments" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"166"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "166"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 166]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 83]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 166]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 166]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.5ms | ActiveRecord: 3.9ms) Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 166]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 122) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 122) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 122], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 122) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 122) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 122], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 122) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 122) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 122], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 169]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 169]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 169], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/169/payments/new" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"169"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "169"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 122]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 169]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 84]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.2ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/169/payments" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"169"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "169"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 122]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 169], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 169]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 84]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 84], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["payment_id", 45], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/169/payments Completed 302 Found in 20ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/169/payments" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"169"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "169"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 169]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 84]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.4ms | ActiveRecord: 3.8ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 169]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 170]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 170]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 170], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 171]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 171]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 171], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/45/reglements/new" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"45"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "45"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 171]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 86]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 170]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 85]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 22.8ms | ActiveRecord: 5.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 123) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 123) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 123], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 123) LIMIT 1  (1.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 123) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 123], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 123) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 123) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 123], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 172]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 172]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 172], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/172/payments/new" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"172"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "172"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 123]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 172]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 87]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.2ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/172/payments" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"172"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "172"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 123]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 172], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 172]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 87]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 87], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["payment_id", 46], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/172/payments Completed 302 Found in 18ms (ActiveRecord: 4.1ms) Started GET "/adherent/members/172/payments" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"172"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "172"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 172]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 87]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.7ms | ActiveRecord: 3.7ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 172]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 173]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 173]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 173], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 174]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 174]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 174], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/46/reglements/new" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"46"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "46"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 174]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 89]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 173]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 88]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.1ms | ActiveRecord: 4.9ms) Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 172]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 172]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 124) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 124) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 124], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (5.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 124) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 124) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 124], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 124) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 124) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 124], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 175]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 175]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 175], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/175/payments/new" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"175"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "175"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 124]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 175]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 90]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.1ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/175/payments" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"175"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "175"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 124]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 175], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 175]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 90]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 90], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["payment_id", 47], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/175/payments Completed 302 Found in 19ms (ActiveRecord: 5.7ms) Started GET "/adherent/members/175/payments" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"175"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "175"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 175]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 90]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.3ms | ActiveRecord: 3.7ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 175]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 176]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 176]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 176], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 177]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 177]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 177], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/47/reglements/new" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"47"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "47"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 177]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 92]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 176]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 91]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 28ms (Views: 17.8ms | ActiveRecord: 5.1ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 125) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 125) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 125], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 125) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 125) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 125], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 125) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 125) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 125], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 178]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 178]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 178], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/178/payments/new" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"178"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "178"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 125]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 178]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 93]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.4ms | ActiveRecord: 3.7ms) Started POST "/adherent/members/178/payments" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"178"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "178"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 125]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 178], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 178]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 93]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 93], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["payment_id", 48], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/178/payments Completed 302 Found in 19ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/178/payments" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"178"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "178"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 178]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 93]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.3ms | ActiveRecord: 3.6ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 178]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 179]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 179]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 179], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 180]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 180]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 180], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/48/reglements/new" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"48"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "48"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 179]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 94]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 180]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 95]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 16.8ms | ActiveRecord: 5.3ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 126) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 126) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 126], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 126) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 126) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 126], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 126) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 126) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 126], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 181]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 181]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 181], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/181/payments/new" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"181"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "181"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 126]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 181]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 96]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.9ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/181/payments" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"181"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "181"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Organism Load (0.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 126]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 181], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 181]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 96]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 96], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["payment_id", 49], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/181/payments Completed 302 Found in 18ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/181/payments" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"181"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "181"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 181]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 96]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.3ms | ActiveRecord: 3.9ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 181]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 182]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 182]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 182], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 183]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 183]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 183], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/49/reglements/new" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"49"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "49"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 182]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 97]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 183]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 98]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.3ms | ActiveRecord: 5.0ms) Started POST "/adherent/payments/49/reglements" for 127.0.0.1 at 2015-03-21 11:50:55 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"97"}, "commit"=>"Enregistrer", "payment_id"=>"49"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "49"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "97"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 97]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 97], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["payment_id", 49], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Redirected to http://www.example.com/adherent/members/181/payments Completed 302 Found in 14ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/181/payments" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"181"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "181"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 181]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 96]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 97]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 182]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.4ms | ActiveRecord: 5.0ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 182]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 97]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 127) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 127) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 127], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 127) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 127) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 127], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 127) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 127) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 127], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 184]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 184]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 184], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/184/payments/new" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"184"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "184"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 127]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 184]]  (1.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 99]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.1ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/184/payments" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"184"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "184"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 184]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 127]] SQL (2.0ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 184], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 184]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 99]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 99], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["payment_id", 50], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/184/payments Completed 302 Found in 19ms (ActiveRecord: 6.0ms) Started GET "/adherent/members/184/payments" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"184"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "184"]] Adherent::Payment Load (1.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 184]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 99]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 184]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 184]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.1ms | ActiveRecord: 4.9ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 184]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 185]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 185]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 185], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 186]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 186]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 186], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/50/reglements/new" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"50"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "50"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 184]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 186]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 101]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 185]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 100]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 15.9ms | ActiveRecord: 5.9ms) Started POST "/adherent/payments/50/reglements" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"100"}, "commit"=>"Enregistrer", "payment_id"=>"50"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "50"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "100"]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 100]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 100], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["payment_id", 50], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 184]] Redirected to http://www.example.com/adherent/members/184/payments Completed 302 Found in 12ms (ActiveRecord: 3.7ms) Started GET "/adherent/members/184/payments" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"184"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "184"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 184]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 99]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 184]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 100]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 185]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 184]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.0ms | ActiveRecord: 4.3ms) Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 99]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 184]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 128) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 128) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 128], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 128) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 128) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 128], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 128) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 128) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 128], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 187]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 187]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 187], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/187/payments/new" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"187"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "187"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 128]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 187]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 102]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.9ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/187/payments" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"187"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "187"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 187]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 128]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 187], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 187]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 102]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 102], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["payment_id", 51], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/187/payments Completed 302 Found in 18ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/187/payments" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"187"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "187"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 187]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 102]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 187]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 187]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.6ms | ActiveRecord: 4.1ms) Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 187]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 188]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 188]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 188], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 189]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 189]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 189], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/51/reglements/new" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"51"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "51"]] Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 187]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 189]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 104]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 188]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 103]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 16.4ms | ActiveRecord: 6.5ms) Started POST "/adherent/payments/51/reglements" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"103"}, "commit"=>"Enregistrer", "payment_id"=>"51"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "51"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "103"]] Adherent::Reglement Load (1.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 103]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 103], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["payment_id", 51], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 187]] Redirected to http://www.example.com/adherent/members/187/payments Completed 302 Found in 13ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/187/payments" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"187"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "187"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 187]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 102]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 187]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 103]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 188]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 187]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.2ms | ActiveRecord: 4.4ms) Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 103]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 188]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 129) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 129) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 129], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 129) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 129) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 129], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 129) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 129) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 129], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 190]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 190]]  (0.2ms) SAVEPOINT active_record_1 SQL (2.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 190], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/190/payments/new" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"190"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "190"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 129]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 190]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 105]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (76.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 89ms (Views: 79.3ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/190/payments" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"190"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "190"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 190]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 129]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 190], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 190]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 105]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 105], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["payment_id", 52], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/190/payments Completed 302 Found in 19ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/190/payments" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"190"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "190"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 190]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 105]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 190]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 190]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.4ms | ActiveRecord: 3.9ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 190]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 191]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 191]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 191], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 192]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 192]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 192], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/52/reglements/new" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"52"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "52"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 190]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 191]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 106]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 192]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 107]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.7ms | ActiveRecord: 5.1ms) Started POST "/adherent/payments/52/reglements" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"106"}, "commit"=>"Enregistrer", "payment_id"=>"52"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "52"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "106"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 106]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 106], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["payment_id", 52], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 190]] Redirected to http://www.example.com/adherent/members/190/payments Completed 302 Found in 13ms (ActiveRecord: 4.2ms) Started GET "/adherent/members/190/payments" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"190"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "190"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 190]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 105]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 190]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 106]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 191]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 190]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.7ms | ActiveRecord: 4.6ms)  (0.3ms) ROLLBACK  (0.7ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 130) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 130) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 130], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 130) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 130) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 130], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 130) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 130) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 130], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 193]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 193]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 193], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/193/payments/new" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"193"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "193"]] Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 130]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 193]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 108]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.5ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/193/payments" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"193"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "193"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 193]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 130]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 193], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 193]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 108]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 108], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["payment_id", 53], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/193/payments Completed 302 Found in 18ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/193/payments" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"193"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "193"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 193]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 108]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 193]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 193]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.0ms | ActiveRecord: 4.1ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 193]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 194]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 194]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 194], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 195]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 195]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 195], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/53/reglements/new" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"53"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "53"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 193]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 195]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 110]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 194]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 109]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 17.1ms | ActiveRecord: 4.9ms) Started POST "/adherent/payments/53/reglements" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"109"}, "commit"=>"Enregistrer", "payment_id"=>"53"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "53"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "109"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 109]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 109], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["payment_id", 53], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 193]] Redirected to http://www.example.com/adherent/members/193/payments Completed 302 Found in 12ms (ActiveRecord: 3.9ms) Started GET "/adherent/members/193/payments" for 127.0.0.1 at 2015-03-21 11:50:56 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"193"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "193"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 193]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 108]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 193]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 109]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 194]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 193]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.8ms | ActiveRecord: 4.3ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.7ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.5ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 199]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 199]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 199], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 199]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 199]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 200]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 200]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 200], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 200]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 200]]  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 201]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 201]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 201], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:50:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 201]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 201]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 131) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 131) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 131], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 202], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 202]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 202]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 202], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 202]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 131]]  (0.4ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 132) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 132) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 132], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 203], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 203]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 203]]  (0.4ms) SAVEPOINT active_record_1 SQL (5.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 203], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 203]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 132]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 203], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 203]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 116]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 116], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["payment_id", 54], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 117]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 117], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["payment_id", 54], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 133) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 133) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 133], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 204], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 204]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 204]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 204], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 204]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 133]]  (0.6ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 134) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 134) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 134], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 205], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 205]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 205]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 205], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 205]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 134]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 205], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 205]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 120]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 120], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["payment_id", 55], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 121]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 121], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["payment_id", 55], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 135) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 135) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 135], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 206], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 206]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 206]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 206], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 206]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 135]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 206], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 206]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 122]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 122], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["payment_id", 56], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5672794 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5696e8c @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x56c2da2 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x56c2e42%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 7ms (ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 3.4ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x573a91a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5753302 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"207"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"208"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/208 Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"209"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (2.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 209 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 209 [["name", "Dalton"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/209 Completed 302 Found in 16ms (ActiveRecord: 6.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"210"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/210 Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.2ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 150) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 150], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/211/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 151) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 151], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/212/coord/new Completed 302 Found in 12ms (ActiveRecord: 3.8ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.1ms | ActiveRecord: 2.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 153) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 153], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/213/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.3ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (118.4ms) COMMIT Adherent::Member Exists (2.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 156) LIMIT 1  (1.0ms) BEGIN Adherent::Member Exists (1.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 156) LIMIT 1 SQL (2.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 156], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (2.2ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 156) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 156) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 156], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 156) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 156) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 156], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (2.5ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 156) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 156) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 156], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 156) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 156) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 156], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) BEGIN Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 214]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 156]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 214], ["mode", "Chèque"], ["updated_at", Sat, 21 Mar 2015 10:50:57 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 214]]  (2.2ms) COMMIT Started GET "/adherent/members/214/payments/57" for 127.0.0.1 at 2015-03-21 11:51:02 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"214", "id"=>"57"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "214"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 57 LIMIT 1 [["member_id", 214]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 214]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 55ms (Views: 32.3ms | ActiveRecord: 15.9ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-03-21 11:51:02 +0100 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-03-21 11:51:02 +0100 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-03-21 11:51:04 +0100 Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-03-21 11:51:04 +0100 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-03-21 11:51:04 +0100 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-03-21 11:51:04 +0100 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-03-21 11:51:04 +0100 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-03-21 11:51:04 +0100 Started DELETE "/adherent/members/214/payments/57" for 127.0.0.1 at 2015-03-21 11:51:05 +0100 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"214", "id"=>"57"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (3.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "214"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 214], ["id", "57"]]  (0.2ms) BEGIN Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] SQL (0.8ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 57]]  (47.6ms) COMMIT Redirected to http://127.0.0.1:34116/adherent/members/214/payments Completed 302 Found in 77ms (ActiveRecord: 54.7ms) Started GET "/adherent/members/214/payments" for 127.0.0.1 at 2015-03-21 11:51:05 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"214"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "214"]] Adherent::Payment Load (1.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 214]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 7.8ms | ActiveRecord: 10.3ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-03-21 11:51:05 +0100  (3.0ms) SELECT COUNT(*) FROM "adherent_payments"  (1.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (5.3ms) select table_name from information_schema.views where table_schema = 'adh_test'  (127.2ms) TRUNCATE TABLE "adherent_coords", "adherent_members", "adherent_adhesions", "organisms", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:06 UTC +00:00]]  (128.1ms) COMMIT Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:51:07 UTC +00:00]]  (5.0ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:51:07 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:51:07 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:51:07 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:51:07 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:51:07 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (3.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]] Adherent::Coord Load (1.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 56ms (Views: 36.4ms | ActiveRecord: 15.4ms) Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-03-21 11:51:07 +0100 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-03-21 11:51:07 +0100 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-03-21 11:51:07 +0100 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-03-21 11:51:07 +0100 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-03-21 11:51:07 +0100 Started GET "/assets/back_disabled.png" for 127.0.0.1 at 2015-03-21 11:51:07 +0100 Started GET "/assets/forward_disabled.png" for 127.0.0.1 at 2015-03-21 11:51:07 +0100 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2015-03-21 11:51:08 +0100 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (2.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.2ms) BEGIN Adherent::Coord Load (2.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] SQL (0.5ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (126.3ms) COMMIT Redirected to http://127.0.0.1:34116/adherent/members Completed 302 Found in 155ms (ActiveRecord: 135.5ms) Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:51:08 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (1.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 24.7ms | ActiveRecord: 7.4ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_members"  (1.2ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (2.5ms) select table_name from information_schema.views where table_schema = 'adh_test'  (116.4ms) TRUNCATE TABLE "adherent_members", "adherent_adhesions", "adherent_coords", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (1.1ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (2.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:09 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:09 UTC +00:00]]  (108.1ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:51:09 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:51:09 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:51:09 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:51:09 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:09 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:51:09 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.2ms) BEGIN SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:51:09 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:51:09 UTC +00:00]]  (1.3ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-03-21 11:51:09 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (1.3ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39ms (Views: 19.8ms | ActiveRecord: 13.1ms) Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2015-03-21 11:51:10 +0100 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (1.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (133.4ms) COMMIT Redirected to http://127.0.0.1:34116/adherent/members/1/adhesions Completed 302 Found in 144ms (ActiveRecord: 137.4ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-03-21 11:51:10 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:34116/adherent/members/1/adhesions/new Completed 302 Found in 7ms (ActiveRecord: 1.9ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2015-03-21 11:51:10 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 16.1ms | ActiveRecord: 4.2ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-03-21 11:51:11 +0100 Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-03-21 11:51:11 +0100  (0.7ms) SELECT COUNT(*) FROM "adherent_adhesions"  (0.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (1.6ms) select table_name from information_schema.views where table_schema = 'adh_test'  (184.5ms) TRUNCATE TABLE "adherent_members", "adherent_adhesions", "adherent_coords", "adherent_reglements", "organisms", "adherent_payments" RESTART IDENTITY CASCADE;  (2.2ms) ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x573661c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.1ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x57639a0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x57639a0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 10ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5791e72 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5791e72%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x57be5f8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x57eadec @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5806b28 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5827620 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x58564a2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x58564a2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x58761bc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x58761bc%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x58bb276 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.7ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x58ea1de @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x59157da @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x59157da%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x594887e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 14], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:51:12 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 14]]  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.5ms) Completed 200 OK in 35ms (Views: 27.0ms | ActiveRecord: 6.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:51:12 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 15]]  (2.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 6]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 6]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 7]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 8]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 9]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 9]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 10]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39ms (Views: 27.1ms | ActiveRecord: 10.5ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 16], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 16], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 16], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 16], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 16], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:51:12 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 16]]  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 11]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 12]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 12]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 13]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 13]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 14]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 15]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 25.8ms | ActiveRecord: 6.2ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 11]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 11], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/11/adhesions" for 127.0.0.1 at 2015-03-21 11:51:12 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"11"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 11]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 7.7ms | ActiveRecord: 2.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 17], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 17], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 17], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 17], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 17], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:51:12 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 17]]  (2.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 16]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 16]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 17]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 18]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 18]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 19]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 19]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 20]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39ms (Views: 28.0ms | ActiveRecord: 10.1ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2015-03-21 11:51:12 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 16.0ms | ActiveRecord: 0.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 18], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 18], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 18], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 18], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:51:12 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 18]]  (1.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 21]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 21]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 22]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 22]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 23]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 23]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 24]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 24]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 25]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39ms (Views: 27.2ms | ActiveRecord: 10.3ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/21/edit" for 127.0.0.1 at 2015-03-21 11:51:12 +0100 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"21"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "21"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 12.8ms | ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 10:51:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:51:12 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 19]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 26]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 27]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 27]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 28]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 28]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 29]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 29]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 30]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 30]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 26.9ms | ActiveRecord: 5.3ms) Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/26/adhesions" for 127.0.0.1 at 2015-03-21 11:51:13 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"26"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Adhesion Exists (1.1ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 26]] Redirected to http://www.example.com/adherent/members/26/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 2.2ms) Started GET "/adherent/members/26/adhesions/new" for 127.0.0.1 at 2015-03-21 11:51:13 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"26"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 26]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 26]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.9ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 20], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:51:13 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 20]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 31]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 31]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 32]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 32]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 33]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 33]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 34]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 34]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 35]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 24.7ms | ActiveRecord: 5.9ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/31/coord" for 127.0.0.1 at 2015-03-21 11:51:13 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"31"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 31]] Redirected to http://www.example.com/adherent/members/31/coord/new Completed 302 Found in 5ms (ActiveRecord: 1.9ms) Started GET "/adherent/members/31/coord/new" for 127.0.0.1 at 2015-03-21 11:51:13 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"31"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 22.4ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.9ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 21], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:51:13 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 21]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 36]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 36]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 37]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 37]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 38]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 38]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 39]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 39]]  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 40]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 40]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 23.9ms | ActiveRecord: 6.1ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/36/payments" for 127.0.0.1 at 2015-03-21 11:51:13 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"36"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 36]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 8ms (Views: 4.5ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 22], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 22], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 22], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 22], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:51:13 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 22]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 41]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 41]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 42]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 42]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 43]] Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 43]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 44]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 45]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 45]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 24.1ms | ActiveRecord: 5.7ms) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["member_id", 41], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 41]] Started GET "/adherent/members/41/coord" for 127.0.0.1 at 2015-03-21 11:51:13 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"41"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 41]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 10ms (Views: 5.7ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 23], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 23], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 23], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 23], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2015-03-21 11:51:13 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 12.5ms | ActiveRecord: 0.7ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2015-03-21 11:51:13 +0100 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 23], ["updated_at", Sat, 21 Mar 2015 10:51:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/51/coord/new Completed 302 Found in 10ms (ActiveRecord: 2.7ms) Started GET "/adherent/members/51/coord/new" for 127.0.0.1 at 2015-03-21 11:51:13 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"51"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "51"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 51]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 19.8ms | ActiveRecord: 1.8ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) COMMIT  (0.2ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (5.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Sat, 21 Mar 2015 10:54:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 24], ["updated_at", Sat, 21 Mar 2015 10:54:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 24], ["updated_at", Sat, 21 Mar 2015 10:54:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 24], ["updated_at", Sat, 21 Mar 2015 10:54:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 24], ["updated_at", Sat, 21 Mar 2015 10:54:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:54:12 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 24]]  (2.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 52]] Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 52]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 53]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 53]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 54]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 54]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 55]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 55]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 56]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 56]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (65.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (22.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.2ms) Completed 200 OK in 117ms (Views: 90.2ms | ActiveRecord: 13.4ms)  (0.4ms) ROLLBACK  (1.0ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 25], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 25], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 25], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 25], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:54:13 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 25]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 57]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 57]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 58]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 58]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 59]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 59]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 60]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 60]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 61]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 61]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (29.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 26.3ms | ActiveRecord: 6.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 26], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 26], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 26], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 26], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2015-03-21 11:54:13 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (30.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/new.html.erb within layouts/adherent/application (33.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 38ms (Views: 35.5ms | ActiveRecord: 0.5ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2015-03-21 11:54:13 +0100 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 26], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/67/coord/new Completed 302 Found in 10ms (ActiveRecord: 2.4ms) Started GET "/adherent/members/67/coord/new" for 127.0.0.1 at 2015-03-21 11:54:13 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"67"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "67"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 67]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (20.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 41ms (Views: 24.2ms | ActiveRecord: 3.2ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 27], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 27], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 27], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 27], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 27], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:54:13 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 27]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 68]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 68]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 69]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 69]]  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 70]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 70]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 71]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 71]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 72]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 72]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (88.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 92ms (Views: 85.0ms | ActiveRecord: 6.0ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/68/edit" for 127.0.0.1 at 2015-03-21 11:54:13 +0100 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"68"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/edit.html.erb within layouts/adherent/application (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 15.0ms | ActiveRecord: 1.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 28], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 28], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 28], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 28], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:54:13 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 28]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 73]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 73]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 74]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 74]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 75]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 75]]  (0.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 76]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 76]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 77]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 77]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (26.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 24.4ms | ActiveRecord: 5.0ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/73/payments" for 127.0.0.1 at 2015-03-21 11:54:13 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"73"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "73"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 73]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (6.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 9.3ms | ActiveRecord: 3.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 29], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 29], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 29], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 29], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:54:13 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 29]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 78]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 78]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 79]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 79]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 80]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 80]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 81]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 81]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 82]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 82]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (26.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 23.8ms | ActiveRecord: 5.2ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 78]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 78]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 78], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/78/adhesions" for 127.0.0.1 at 2015-03-21 11:54:13 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"78"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "78"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 78]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 78]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (19.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 18.9ms | ActiveRecord: 5.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.9ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 30], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 30], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 30], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 30], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:54:13 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 30]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 83]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 83]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 84]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 84]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 85]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 85]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 86]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 86]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 87]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 87]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (27.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 24.5ms | ActiveRecord: 5.2ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["member_id", 83], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 83]] Started GET "/adherent/members/83/coord" for 127.0.0.1 at 2015-03-21 11:54:13 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"83"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "83"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 83]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/show.html.erb within layouts/adherent/application (2.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 11ms (Views: 6.5ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 31], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 31], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 31], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 31], ["updated_at", Sat, 21 Mar 2015 10:54:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:54:13 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 31]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 88]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 88]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 89]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 89]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 90]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 90]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 91]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 91]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 92]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 92]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (26.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 24.9ms | ActiveRecord: 5.1ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/88/adhesions" for 127.0.0.1 at 2015-03-21 11:54:13 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"88"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "88"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 88]] Redirected to http://www.example.com/adherent/members/88/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.6ms) Started GET "/adherent/members/88/adhesions/new" for 127.0.0.1 at 2015-03-21 11:54:13 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"88"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "88"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 88]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 88]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.4ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 32], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 32], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 32], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 32], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 32], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:54:14 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 32]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 93]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 93]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 94]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 94]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 95]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 95]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 96]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 96]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 97]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 97]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (29.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 26.9ms | ActiveRecord: 5.6ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/93/coord" for 127.0.0.1 at 2015-03-21 11:54:14 +0100 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"93"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 93]] Redirected to http://www.example.com/adherent/members/93/coord/new Completed 302 Found in 5ms (ActiveRecord: 1.5ms) Started GET "/adherent/members/93/coord/new" for 127.0.0.1 at 2015-03-21 11:54:14 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"93"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 93]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (16.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 19.2ms | ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 33], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 33], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 33], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 33], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:54:14 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 33]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 98]] Adherent::Coord Load (1.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 98]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 99]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 99]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 100]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 100]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 101]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 101]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 102]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 102]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (33.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 38ms (Views: 30.1ms | ActiveRecord: 6.4ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2015-03-21 11:54:14 +0100 Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/new.html.erb within layouts/adherent/application (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 11.9ms | ActiveRecord: 0.5ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/103/coord/new" for 127.0.0.1 at 2015-03-21 11:54:14 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"103"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "103"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 103]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 18.0ms | ActiveRecord: 1.3ms) Started POST "/adherent/members/103/coord" for 127.0.0.1 at 2015-03-21 11:54:14 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"103"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "103"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 103]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 103], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/103/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 3.3ms) Started GET "/adherent/members/103/adhesions/new" for 127.0.0.1 at 2015-03-21 11:54:14 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"103"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "103"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 103]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 103]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.5ms | ActiveRecord: 1.8ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 35], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/104/coord/new" for 127.0.0.1 at 2015-03-21 11:54:14 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"104"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "104"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 104]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (14.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (15.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 17.3ms | ActiveRecord: 1.5ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/104/coord" for 127.0.0.1 at 2015-03-21 11:54:14 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"104"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "104"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 104]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 104], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/104/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 2.5ms) Started GET "/adherent/members/104/adhesions/new" for 127.0.0.1 at 2015-03-21 11:54:14 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"104"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "104"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 104]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 104]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (7.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.0ms | ActiveRecord: 2.1ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 36], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/105/coord/new" for 127.0.0.1 at 2015-03-21 11:54:14 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"105"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "105"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 105]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (83.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (84.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 90ms (Views: 86.3ms | ActiveRecord: 1.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 37], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/106/coord/new" for 127.0.0.1 at 2015-03-21 11:54:14 +0100 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"106"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "106"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 106]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (16.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/new.html.erb within layouts/adherent/application (17.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 19.2ms | ActiveRecord: 1.4ms) Started POST "/adherent/members/106/coord" for 127.0.0.1 at 2015-03-21 11:54:14 +0100 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"106"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "106"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 106]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 106], ["office", ""], ["tel", ""], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/106/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 2.9ms) Started GET "/adherent/members/106/adhesions/new" for 127.0.0.1 at 2015-03-21 11:54:14 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"106"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "106"]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 106]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 106]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (6.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (7.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.3ms | ActiveRecord: 2.8ms) Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 106]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5f472d4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x5f953d0 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (0.4ms) Completed 200 OK in 7ms (Views: 2.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5fc4c98 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.5ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5fe4318 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x600309c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x601b656 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x601b656%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x603ba6e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x603ba6e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x605d434 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 45], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 107], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 107]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 107]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 107], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 107]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 45]]  (0.4ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 46], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 108], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 108]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 108]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 108], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 108]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 46]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 47], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 109], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 109]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 109]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 109], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 109]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 47]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 109], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 109]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 7], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 8], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (1.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.5ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 48], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 110], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 110]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 110]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 110], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 110]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 48]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 110], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 110]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 9], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["payment_id", 2], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 49], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 111], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 111]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 111]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["from_date", Wed, 22 Apr 2015], ["member_id", 111], ["to_date", Thu, 21 Apr 2016], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 111]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 49]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 111], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 111]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 11], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["payment_id", 3], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 12], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00], ["payment_id", 3], ["updated_at", Sat, 21 Mar 2015 10:54:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 50], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 50], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 50], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 112]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 112]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 112], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/112/payments/new" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"112"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "112"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 50]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 112]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.1ms) Completed 200 OK in 40ms (Views: 29.8ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/112/payments" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"112"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "112"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 112]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 50]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 112], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 112]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 13], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["payment_id", 4], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/112/payments Completed 302 Found in 18ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/112/payments" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"112"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "112"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 112]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 112]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 112]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (17.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 23.7ms | ActiveRecord: 4.9ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 112]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 113]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 113]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 113], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 114]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 114]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 114], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/4/reglements/new" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 112]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 114]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 113]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (18.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 36ms (Views: 24.6ms | ActiveRecord: 5.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.7ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 51], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 51], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 51], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 115]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 115]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 115], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/115/payments/new" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"115"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "115"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 51]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 115]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.8ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/115/payments" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"115"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "115"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 115]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 51]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 115], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 115]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 16], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["payment_id", 5], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/115/payments Completed 302 Found in 19ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/115/payments" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"115"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "115"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 115]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 115]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 115]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.8ms | ActiveRecord: 4.4ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 115]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 116]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 116]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 116], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 117]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 117]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 117], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/5/reglements/new" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"5"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 115]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 116]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.9ms | ActiveRecord: 5.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 52], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 52], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 52], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 118]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 118]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 118], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/118/payments/new" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"118"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "118"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 52]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 118]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.9ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/118/payments" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"118"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "118"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 118]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 52]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 118], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 118]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 19], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["payment_id", 6], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/118/payments Completed 302 Found in 19ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/118/payments" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"118"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "118"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 118]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 118]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 118]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.9ms | ActiveRecord: 4.3ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 118]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 119]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 119]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 119], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 120]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 120]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 120], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/6/reglements/new" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"6"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "6"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 118]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 119]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 17.9ms | ActiveRecord: 5.9ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 118]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 118]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 53], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 53], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 53], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 121]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 121]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 121], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/121/payments/new" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"121"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "121"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 53]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 121]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.7ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/121/payments" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"121"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "121"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 121]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 53]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 121], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 121]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 22], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/121/payments Completed 302 Found in 17ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/121/payments" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"121"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "121"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 121]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 121]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 121]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.9ms | ActiveRecord: 4.0ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 121]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 122]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 122]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 122], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 123]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 123]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 123], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/7/reglements/new" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"7"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 121]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 122]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.2ms | ActiveRecord: 5.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 54], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 54], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 54], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 124]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 124]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 124], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/124/payments/new" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"124"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "124"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 54]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 124]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.1ms | ActiveRecord: 2.0ms) Started POST "/adherent/members/124/payments" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"124"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "124"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 124]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 54]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 124], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 124]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 25], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (1.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/124/payments Completed 302 Found in 19ms (ActiveRecord: 5.7ms) Started GET "/adherent/members/124/payments" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"124"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "124"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 124]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 124]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 124]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.6ms | ActiveRecord: 3.8ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 124]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 125]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 125]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 125], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 126]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 126]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 126], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/8/reglements/new" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"8"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 124]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 125]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.6ms | ActiveRecord: 5.3ms) Started POST "/adherent/payments/8/reglements" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"26"}, "commit"=>"Enregistrer", "payment_id"=>"8"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 26], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 124]] Redirected to http://www.example.com/adherent/members/124/payments Completed 302 Found in 12ms (ActiveRecord: 3.9ms) Started GET "/adherent/members/124/payments" for 127.0.0.1 at 2015-03-21 11:54:15 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"124"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "124"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 124]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 124]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 125]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 124]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.2ms | ActiveRecord: 4.1ms) Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 125]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]]  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 55], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 55], ["updated_at", Sat, 21 Mar 2015 10:54:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (5.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 55], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 127]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 127]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 127], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/127/payments/new" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"127"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "127"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 55]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 127]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.6ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/127/payments" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"127"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "127"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 55]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 127], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 127]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 28], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/127/payments Completed 302 Found in 19ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/127/payments" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"127"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "127"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 127]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.1ms | ActiveRecord: 3.9ms) Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 127]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 128]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 128]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 128], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 129]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 129]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 129], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/9/reglements/new" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"9"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 128]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 19.3ms | ActiveRecord: 6.7ms) Started POST "/adherent/payments/9/reglements" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"29"}, "commit"=>"Enregistrer", "payment_id"=>"9"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "29"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 29], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]] Redirected to http://www.example.com/adherent/members/127/payments Completed 302 Found in 13ms (ActiveRecord: 4.1ms) Started GET "/adherent/members/127/payments" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"127"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "127"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 127]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 128]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.2ms | ActiveRecord: 4.5ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 128]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 56], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (2.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 56], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 56], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 130]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 130]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 130], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/130/payments/new" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"130"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "130"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 56]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 130]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.6ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/130/payments" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"130"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "130"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 56]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 130], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 130]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 31], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/130/payments Completed 302 Found in 18ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/130/payments" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"130"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "130"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 130]] Adherent::Reglement Load (1.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.4ms | ActiveRecord: 4.7ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 130]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 131]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 131]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 131], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 132]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 132]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 132], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/10/reglements/new" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"10"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 131]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 15.4ms | ActiveRecord: 5.9ms) Started POST "/adherent/payments/10/reglements" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"32"}, "commit"=>"Enregistrer", "payment_id"=>"10"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "32"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 32], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]] Redirected to http://www.example.com/adherent/members/130/payments Completed 302 Found in 11ms (ActiveRecord: 3.6ms) Started GET "/adherent/members/130/payments" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"130"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "130"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 130]] Adherent::Reglement Load (1.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 131]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.8ms | ActiveRecord: 5.3ms) Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 57], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 57], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 57], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 133]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 133]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 133], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/133/payments/new" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"133"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "133"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 57]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 133]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.7ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/133/payments" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"133"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "133"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 57]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 133], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 133]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 34], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/133/payments Completed 302 Found in 18ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/133/payments" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"133"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "133"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 133]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.3ms | ActiveRecord: 3.9ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 133]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 134]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 134]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 134], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 135]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 135]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 135], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/11/reglements/new" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"11"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 135]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 134]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.3ms | ActiveRecord: 5.5ms) Started POST "/adherent/payments/11/reglements" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"35"}, "commit"=>"Enregistrer", "payment_id"=>"11"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "35"]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 35], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]] Redirected to http://www.example.com/adherent/members/133/payments Completed 302 Found in 12ms (ActiveRecord: 3.8ms) Started GET "/adherent/members/133/payments" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"133"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "133"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 133]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 134]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.8ms | ActiveRecord: 5.0ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 58], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 58], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 58], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 136]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 136]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 136], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/136/payments/new" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"136"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "136"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 58]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 136]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.2ms | ActiveRecord: 2.0ms) Started POST "/adherent/members/136/payments" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"136"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "136"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 136]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 58]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 136], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 136]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 37], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["payment_id", 12], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/136/payments Completed 302 Found in 19ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/136/payments" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"136"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "136"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 136]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 37]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 136]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 136]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.3ms | ActiveRecord: 4.5ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 136]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 137]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 137]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 137], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 138]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 138]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 138], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/12/reglements/new" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"12"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 136]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 137]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 17.0ms | ActiveRecord: 5.0ms) Started POST "/adherent/payments/12/reglements" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"38"}, "commit"=>"Enregistrer", "payment_id"=>"12"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 38], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["payment_id", 12], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 136]] Redirected to http://www.example.com/adherent/members/136/payments Completed 302 Found in 13ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/136/payments" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"136"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "136"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 136]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 37]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 136]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 137]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 136]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.3ms | ActiveRecord: 5.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 59], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 59], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 59], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 139]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 139]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 139], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/139/payments/new" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"139"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "139"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 59]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 139]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 40]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.1ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/139/payments" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"139"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "139"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 139]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 59]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 139], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 139]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 40]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 40], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["payment_id", 13], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/139/payments Completed 302 Found in 17ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/139/payments" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"139"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "139"]] Adherent::Payment Load (0.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 139]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 40]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 139]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 139]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.5ms | ActiveRecord: 4.0ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 139]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 60], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 60], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 60], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 142]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 142]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 142], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/142/payments/new" for 127.0.0.1 at 2015-03-21 11:54:16 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"142"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "142"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 60]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 142]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 41]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (78.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 89ms (Views: 81.3ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/142/payments" for 127.0.0.1 at 2015-03-21 11:54:17 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"142"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "142"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 60]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 142], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 142]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 41]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 41], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["payment_id", 14], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/142/payments Completed 302 Found in 19ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/142/payments" for 127.0.0.1 at 2015-03-21 11:54:17 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"142"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "142"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 142]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 41]] Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.1ms | ActiveRecord: 4.2ms)  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 142]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 61], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 61], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 61], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 145]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 145]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 145], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/145/payments/new" for 127.0.0.1 at 2015-03-21 11:54:17 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"145"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "145"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 61]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 145]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 42]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.6ms | ActiveRecord: 2.0ms) Started POST "/adherent/members/145/payments" for 127.0.0.1 at 2015-03-21 11:54:17 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"145"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "145"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 145]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 61]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 145], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 145]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 42]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 42], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["payment_id", 15], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/145/payments Completed 302 Found in 18ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/145/payments" for 127.0.0.1 at 2015-03-21 11:54:17 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"145"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "145"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 145]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 42]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 145]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 145]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 19.6ms | ActiveRecord: 4.7ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 62], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 62], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 62], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 148]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 148]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 148], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 148]] Started GET "/adherent/members/148/payments/new" for 127.0.0.1 at 2015-03-21 11:54:17 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"148"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "148"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 62]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 148]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 43]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.0ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/148/payments" for 127.0.0.1 at 2015-03-21 11:54:17 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"148"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "148"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 148]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 62]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 148], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 148]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 43]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 43], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["payment_id", 16], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/148/payments Completed 302 Found in 18ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/148/payments" for 127.0.0.1 at 2015-03-21 11:54:17 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"148"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "148"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 148]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 43]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 148]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 148]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.0ms | ActiveRecord: 3.7ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 148]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 63], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 63], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 63], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 151]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 151]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 151], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/151/payments/new" for 127.0.0.1 at 2015-03-21 11:54:17 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"151"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "151"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 63]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 151]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 44]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.1ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/151/payments" for 127.0.0.1 at 2015-03-21 11:54:17 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"151"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "151"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 151]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 63]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 151], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 151]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 44]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 44], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["payment_id", 17], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/151/payments Completed 302 Found in 18ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/151/payments" for 127.0.0.1 at 2015-03-21 11:54:17 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"151"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "151"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 151]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 44]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 151]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 151]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.2ms | ActiveRecord: 3.9ms)  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 151]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 64], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 64], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 64], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 154]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 154]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 154], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/154/payments/new" for 127.0.0.1 at 2015-03-21 11:54:17 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"154"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "154"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 64]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 154]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.0ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/154/payments" for 127.0.0.1 at 2015-03-21 11:54:17 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"154"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "154"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 64]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 154], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 154]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 45], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["payment_id", 18], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/154/payments Completed 302 Found in 18ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/154/payments" for 127.0.0.1 at 2015-03-21 11:54:17 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"154"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "154"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 154]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 45]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.9ms | ActiveRecord: 3.9ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 154]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]]  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 65], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 65], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 65], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 157]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 157]]  (1.6ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 157], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/157/payments/new" for 127.0.0.1 at 2015-03-21 11:54:17 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"157"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "157"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 65]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 157]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.3ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/157/payments" for 127.0.0.1 at 2015-03-21 11:54:17 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"157"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "157"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 65]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 157], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 157]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 46], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/157/payments Completed 302 Found in 17ms (ActiveRecord: 3.9ms) Started GET "/adherent/members/157/payments" for 127.0.0.1 at 2015-03-21 11:54:17 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"157"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "157"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 157]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 46]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Reglement Load (0.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.9ms | ActiveRecord: 4.1ms)  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 157]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"160"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/160 Completed 302 Found in 7ms (ActiveRecord: 2.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"161"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 161 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 161 [["name", "Dalton"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/161 Completed 302 Found in 13ms (ActiveRecord: 4.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"162"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/162 Completed 302 Found in 7ms (ActiveRecord: 2.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"163"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.2ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 70], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/164/coord/new Completed 302 Found in 11ms (ActiveRecord: 4.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.9ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 72) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 72], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/165/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 73) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 73], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/166/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.3ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 1.6ms)  (0.6ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.8ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x64509a6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x64610e4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 2.5ms | ActiveRecord: 1.4ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x6496f46 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.3ms | ActiveRecord: 1.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x64b1bb6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x64b1bb6%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x64cba8e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x64cba8e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x64ea6f0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x54d5f4e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x54d5f4e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x577953e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x577953e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.5ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"21/03/2016", "from_date"=>"21/03/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ac0526 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.8ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5b7a098 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5df4f1c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ec720a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5edfc1a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5edfc1a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5eff6a0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 1.7ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5f1e636 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 167]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 167]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 167], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 167]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 167]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 168]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 168]]  (1.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 168], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 168]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 168]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 169]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 169]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 169], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 169]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 169]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 97], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 173]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 173]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 173], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 173]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 97]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 173], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 173]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/173/payments/20" for 127.0.0.1 at 2015-03-21 11:54:18 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"173", "id"=>"20"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "173"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 20 LIMIT 1 [["member_id", 173]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 173]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 23.2ms | ActiveRecord: 3.9ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 98], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 174]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 174]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 174], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 174]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 98]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 174], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 174]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/174/payments/21" for 127.0.0.1 at 2015-03-21 11:54:18 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"174", "id"=>"21"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "174"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 21 LIMIT 1 [["member_id", 174]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 174]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.6ms | ActiveRecord: 3.5ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 99], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 175]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 175]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 175], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 99]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 175], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 175]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/175/payments/22" for 127.0.0.1 at 2015-03-21 11:54:18 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"175", "id"=>"22"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "175"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 22 LIMIT 1 [["member_id", 175]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 10.9ms | ActiveRecord: 4.2ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 100], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 176]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 176]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 176], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 176]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 100]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 176], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 176]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/176/payments" for 127.0.0.1 at 2015-03-21 11:54:18 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"176"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "176"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 176]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 176]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.1ms | ActiveRecord: 3.9ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 101], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 177]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 177]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 177], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 177]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 101]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 177], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 177]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/177/payments" for 127.0.0.1 at 2015-03-21 11:54:18 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"177"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "177"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 177]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Reglement Load (0.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 177]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.1ms | ActiveRecord: 3.8ms) Started GET "/adherent/payments/24/reglements/new" for 127.0.0.1 at 2015-03-21 11:54:18 +0100 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"24"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "24"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 177]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 24]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (7.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.1ms | ActiveRecord: 3.8ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 102], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 178]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 178]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 178], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/178/payments/new" for 127.0.0.1 at 2015-03-21 11:54:18 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"178"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "178"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 102]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 178]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (81.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 91ms (Views: 84.3ms | ActiveRecord: 2.0ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 178]] Started POST "/adherent/members/178/payments" for 127.0.0.1 at 2015-03-21 11:54:18 +0100 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"21/03/2015", "comment"=>"", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"178"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "178"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 102]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 178], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 178]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/178/payments Completed 302 Found in 14ms (ActiveRecord: 3.7ms) Started GET "/adherent/members/178/payments" for 127.0.0.1 at 2015-03-21 11:54:18 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"178"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "178"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 178]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.1ms | ActiveRecord: 3.6ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 178]] SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 103], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 179]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 179]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 179], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/179/payments/new" for 127.0.0.1 at 2015-03-21 11:54:18 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"179"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "179"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 103]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 179]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.4ms | ActiveRecord: 1.9ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 104) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 104) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 104], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 180]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 180]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 180], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/180/payments/new" for 127.0.0.1 at 2015-03-21 11:54:18 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"180"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "180"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 104]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 180]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.1ms | ActiveRecord: 1.8ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 105) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 105) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 105], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 181]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 181]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 181], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/181/payments/new" for 127.0.0.1 at 2015-03-21 11:54:18 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"181"} Organism Load (1.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "181"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 105]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 181]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.1ms | ActiveRecord: 2.9ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 59], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]]  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 60], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 1], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 61]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 61], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.7ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 106) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 106) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 106], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 106) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 106) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 106], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 182], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 183], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 183]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 106]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 183], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 183]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 63]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 63], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["payment_id", 26], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 182]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 106]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 182], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 182]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 62], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["payment_id", 27], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 107) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 107) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 107], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 107) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 107) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 107], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 184], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 185], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 185]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 107]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 185], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 185]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 65], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["payment_id", 28], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 108) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 108) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 108], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 108) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 108) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 108], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 186], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 187], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 187]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 108]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 187], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 187]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 67]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 67], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["payment_id", 29], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 187]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 108]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 187], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 187]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 67]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 67], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["payment_id", 30], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 186]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 108]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 186], ["mode", "CB"], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 186]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 66]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 66], ["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["payment_id", 31], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (1.8ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (36.2ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 109) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 109) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 109], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 109) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 109) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 109], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 109) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 109) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 109], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 109) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 109) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 109], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 109) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 109) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 109], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 188]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 188]]  (0.3ms) BEGIN SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 188], ["to_date", Sun, 20 Mar 2016], ["updated_at", Sat, 21 Mar 2015 10:54:19 UTC +00:00]]  (1.3ms) COMMIT Started GET "/adherent/members/188/adhesions" for 127.0.0.1 at 2015-03-21 11:54:24 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"188"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "188"]] Adherent::Adhesion Exists (1.2ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 188]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 188]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 68]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 68]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 48ms (Views: 24.1ms | ActiveRecord: 16.1ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-03-21 11:54:24 +0100 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-03-21 11:54:24 +0100 Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-03-21 11:54:24 +0100 Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-03-21 11:54:24 +0100 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-03-21 11:54:24 +0100 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-03-21 11:54:24 +0100 Started DELETE "/adherent/members/188/adhesions/68" for 127.0.0.1 at 2015-03-21 11:54:25 +0100 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"188", "id"=>"68"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "188"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 188], ["id", "68"]]  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 68]]  (92.3ms) COMMIT Redirected to http://127.0.0.1:33473/adherent/members/188/adhesions Completed 302 Found in 106ms (ActiveRecord: 95.1ms) Started GET "/adherent/members/188/adhesions" for 127.0.0.1 at 2015-03-21 11:54:25 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"188"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "188"]] Adherent::Adhesion Exists (1.1ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 188]] Redirected to http://127.0.0.1:33473/adherent/members/188/adhesions/new Completed 302 Found in 15ms (ActiveRecord: 9.7ms) Started GET "/adherent/members/188/adhesions/new" for 127.0.0.1 at 2015-03-21 11:54:26 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"188"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "188"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 188]] Adherent::Adhesion Load (1.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 188]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 17.6ms | ActiveRecord: 2.8ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-03-21 11:54:26 +0100  (1.2ms) SELECT COUNT(*) FROM "adherent_adhesions"  (1.3ms) ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (3.6ms) select table_name from information_schema.views where table_schema = 'adh_test'  (191.2ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "organisms", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (1.6ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:27 UTC +00:00]]  (101.2ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:27 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:27 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:27 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:27 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:27 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:27 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:54:27 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (2.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]] Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 44ms (Views: 29.8ms | ActiveRecord: 12.3ms) Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-03-21 11:54:27 +0100 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-03-21 11:54:27 +0100 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-03-21 11:54:27 +0100 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-03-21 11:54:27 +0100 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-03-21 11:54:27 +0100 Started GET "/assets/back_disabled.png" for 127.0.0.1 at 2015-03-21 11:54:27 +0100 Started GET "/assets/forward_disabled.png" for 127.0.0.1 at 2015-03-21 11:54:27 +0100 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2015-03-21 11:54:28 +0100 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.1ms) BEGIN Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] SQL (0.5ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (129.8ms) COMMIT Redirected to http://127.0.0.1:33473/adherent/members Completed 302 Found in 149ms (ActiveRecord: 140.7ms) Started GET "/adherent/members" for 127.0.0.1 at 2015-03-21 11:54:28 +0100 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."organism_id" = $1 [["organism_id", 1]]  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (0.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]] Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.5ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 23.8ms | ActiveRecord: 6.5ms)  (1.6ms) SELECT COUNT(*) FROM "adherent_members"  (3.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (3.9ms) select table_name from information_schema.views where table_schema = 'adh_test'  (136.2ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.1ms) BEGIN SQL (1.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:29 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:29 UTC +00:00]]  (102.9ms) COMMIT Adherent::Member Exists (2.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (1.0ms) BEGIN Adherent::Member Exists (1.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:29 UTC +00:00]]  (3.7ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:29 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:29 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:29 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:29 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:29 UTC +00:00]]  (2.8ms) COMMIT Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) BEGIN Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:29 UTC +00:00], ["date", Sat, 21 Mar 2015], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Sat, 21 Mar 2015 10:54:29 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (1.7ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-03-21 11:54:30 +0100 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 1]] Adherent::Reglement Load (1.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 14.5ms | ActiveRecord: 10.7ms) Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-03-21 11:54:30 +0100 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-03-21 11:54:30 +0100 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-03-21 11:54:30 +0100 Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-03-21 11:54:30 +0100 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.1ms) BEGIN Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] SQL (0.6ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (144.0ms) COMMIT Redirected to http://127.0.0.1:33473/adherent/members/1/payments Completed 302 Found in 159ms (ActiveRecord: 150.3ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2015-03-21 11:54:31 +0100 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 12ms (Views: 4.2ms | ActiveRecord: 3.2ms)  (1.8ms) SELECT COUNT(*) FROM "adherent_payments"  (1.4ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (190.1ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "organisms", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (1.0ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL  (0.6ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x600e938 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (2.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 5.2ms | ActiveRecord: 3.5ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6036e92 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6036e92%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 9ms (ActiveRecord: 1.8ms)  (1.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x605d97a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x605d97a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 12ms (ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x607fc8c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.3ms | ActiveRecord: 2.6ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x6098f48 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.8ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x60baa08 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x60baa08%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 7ms (ActiveRecord: 2.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x60dabe6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x60f32fe @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x610aecc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x61222d4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x613a546 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["member_id", 1], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["zip", 59000]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 1]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] SQL (0.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (1.0ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.6ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x61d977c @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x61d97d6%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x620e76a @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x624c10a @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 2], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/2/adhesions" for 127.0.0.1 at 2015-03-21 11:54:32 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"2"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 2]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 2]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 15ms (Views: 9.4ms | ActiveRecord: 2.8ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 16], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (2.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 3], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/3/adhesions" for 127.0.0.1 at 2015-03-21 11:54:32 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"3"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 3]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 3]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 16.0ms | ActiveRecord: 5.8ms) Started GET "/adherent/members/3/payments/new" for 127.0.0.1 at 2015-03-21 11:54:32 +0100 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"3"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 3]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.3ms | ActiveRecord: 3.2ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 17], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["from_date", Sat, 21 Mar 2015], ["member_id", 4], ["to_date", Tue, 21 Apr 2015], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/4/adhesions" for 127.0.0.1 at 2015-03-21 11:54:32 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"4"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 4]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.2ms | ActiveRecord: 2.3ms) Started GET "/adherent/members/4/adhesions/3/edit" for 127.0.0.1 at 2015-03-21 11:54:32 +0100 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"4", "id"=>"3"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 4], ["id", "3"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.6ms | ActiveRecord: 1.7ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/5/adhesions/new" for 127.0.0.1 at 2015-03-21 11:54:32 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"5"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.1ms | ActiveRecord: 2.5ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] Started POST "/adherent/members/5/adhesions" for 127.0.0.1 at 2015-03-21 11:54:32 +0100 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"5"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 5], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/5/adhesions Completed 302 Found in 9ms (ActiveRecord: 2.7ms) Started GET "/adherent/members/5/adhesions" for 127.0.0.1 at 2015-03-21 11:54:32 +0100 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"5"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 5]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 9.6ms | ActiveRecord: 3.9ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.8ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Sat, 21 Mar 2015 10:54:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/6/adhesions/new" for 127.0.0.1 at 2015-03-21 11:54:32 +0100 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"6"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "6"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 6]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 6]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.9ms | ActiveRecord: 2.1ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.7ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (72.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:07 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 1], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:00:07 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1  (10.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]]  (0.4ms) SAVEPOINT active_record_1 SQL (30.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 5], ["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:07 UTC +00:00], ["payment_id", 1], ["updated_at", Sun, 12 Apr 2015 05:00:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]]  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 1], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 6], ["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["payment_id", 1], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 1], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 7], ["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["payment_id", 1], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (24.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (74.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (44.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 20], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 7], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 8], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 20]] SQL (30.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 8], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]] Adherent::Adhesion Load (19.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 9], ["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["payment_id", 1], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 20]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 7], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 8], ["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["payment_id", 2], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 21], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 9], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 10], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 10]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 21]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 10], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 10]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 11], ["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["payment_id", 3], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 22], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 11], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 12], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 12]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 12], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 12]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 13], ["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["payment_id", 4], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 12]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 12], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 12]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 13], ["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["payment_id", 5], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 11], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 12], ["amount", #], ["created_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00], ["payment_id", 6], ["updated_at", Sun, 12 Apr 2015 05:00:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (2.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (1.2ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (6.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/show.html.erb within layouts/adherent/application (0.4ms) Completed 200 OK in 44ms (Views: 8.4ms | ActiveRecord: 14.7ms)  (1.1ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"13"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/13 Completed 302 Found in 7ms (ActiveRecord: 1.2ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"14"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 14 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 14 [["name", "Dalton"], ["updated_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/14 Completed 302 Found in 13ms (ActiveRecord: 4.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"15"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/15 Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"16"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.8ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 21ms (Views: 2.4ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.2ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 34], ["updated_at", Sun, 12 Apr 2015 05:05:21 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/17/coord/new Completed 302 Found in 73ms (ActiveRecord: 4.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:05:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:05:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 36], ["updated_at", Sun, 12 Apr 2015 05:05:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/18/coord/new Completed 302 Found in 13ms (ActiveRecord: 4.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:05:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 37], ["updated_at", Sun, 12 Apr 2015 05:05:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/19/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x54d35e6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:05:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x57a58c8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:05:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:05:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.5ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:16:17 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:16:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 20]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 20]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:16:17 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 20], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:16:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 20]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 20]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:16:17 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:16:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 21]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 21]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:16:17 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 21], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:16:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 21]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 21]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:16:17 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:16:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 22]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 22]]  (1.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:16:17 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 22], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:16:17 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 22]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 22]]  (0.5ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:16:17 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:16:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:16:17 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:16:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:16:17 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:16:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (3.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:17:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:17:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:17:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:17:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:17:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:17:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:17:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:17:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 29]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 29]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:17:23 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 29], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:17:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 29]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 29]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:17:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:17:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 30]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 30]]  (0.8ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:17:23 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 30], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:17:23 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 30]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 30]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:17:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:17:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 31]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 31]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:17:24 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 31], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:17:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 31]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 31]]  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (3.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:19:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:19:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:19:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:19:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (2.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:19:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:19:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:19:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:19:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 35]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 35]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:19:05 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 35], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:19:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 35]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 35]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:19:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:19:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 36]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 36]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:19:05 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 36], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:19:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 36]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 36]]  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (3.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:19:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:19:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 37]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 37]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:19:05 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 37], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:19:05 UTC +00:00]]  (1.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 37]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 37]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.4ms) BEGIN Adherent::Member Exists (1.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (3.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:19:29 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:19:29 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:19:29 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:19:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:19:29 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:19:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:19:29 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:19:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 41]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 41]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:19:29 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 41], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:19:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 41]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 41]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:19:29 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:19:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 42]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 42]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:19:29 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 42], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:19:29 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 42]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 42]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:19:29 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:19:29 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 43]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 43]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:19:29 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 43], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:19:29 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 43]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 43]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:19:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:19:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:19:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:19:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:19:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:19:41 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:19:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:19:41 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 47]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 47]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:19:41 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 47], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:19:41 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 47]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 47]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:19:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:19:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 48]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 48]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:19:41 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 48], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:19:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 48]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 48]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:19:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:19:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 49]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 49]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:19:41 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 49], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:19:41 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 49]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 49]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:20:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:20:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 50]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 50]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:20:26 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 50], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:20:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 50]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 50]]  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:20:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:20:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 51]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 51]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:20:26 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 51], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:20:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 51]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 51]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:20:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:20:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 52]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 52]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:20:26 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 52], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:20:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 52]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 52]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:20:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:20:26 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:20:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:20:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (1.1ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:20:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:20:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:21:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:21:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 56]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 56]]  (0.5ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:21:13 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 56], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:21:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 56]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 56]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:21:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:21:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 57]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 57]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:21:13 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 57], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:21:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 57]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 57]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:21:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:21:13 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 58]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 58]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:21:13 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 58], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:21:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 58]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 58]]  (0.2ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:21:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:21:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:21:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:21:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:21:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:21:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:26:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:26:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 62]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 62]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:26:25 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 62], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:26:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 62]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 62]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:26:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:26:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 63]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 63]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:26:25 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 63], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:26:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 63]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 63]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:26:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:26:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 64]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 64]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:26:25 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 64], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:26:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 64]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 64]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:26:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:26:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:26:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:26:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:26:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:26:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:29:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:29:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 68]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 68]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:29:24 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 68], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:29:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 68]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 68]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:29:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:29:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 69]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 69]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:29:24 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 69], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:29:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 69]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 69]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:29:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:29:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 70]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 70]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:29:24 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 70], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:29:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 70]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 70]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:29:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:29:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:29:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:29:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:29:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:29:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (2.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:30:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:30:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:30:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:30:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:30:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:30:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:30:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:30:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 77]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 77]]  (0.3ms) SAVEPOINT active_record_1 SQL (2.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:30:51 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 77], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:30:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 77]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 77]]  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:30:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:30:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 78]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 78]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:30:51 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 78], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:30:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 78]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 78]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:30:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:30:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 79]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 79]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:30:51 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 79], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:30:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 79]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 79]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:35:43 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:35:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 80]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 80]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:35:43 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 80], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:35:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 80]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 80]]  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:35:43 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:35:43 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 81]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 81]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:35:43 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 81], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:35:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 81]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 81]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:35:43 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:35:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 82]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 82]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:35:43 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 82], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:35:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 82]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 82]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:35:43 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:35:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:35:43 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:35:43 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:35:43 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:35:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (3.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:39:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:39:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:39:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:39:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:39:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:39:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:39:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:39:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 89]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 89]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:39:07 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 89], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:39:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 89]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 89]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:39:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:39:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 90]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 90]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:39:07 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 90], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:39:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 90]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 90]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:39:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:39:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 91]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 91]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:39:07 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 91], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:39:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 91]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 91]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:41:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:41:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 92]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 92]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:41:40 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 92], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:41:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 92]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 92]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:41:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:41:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 93]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 93]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:41:40 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 93], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:41:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 93]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 93]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:41:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:41:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 94]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 94]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:41:40 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 94], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:41:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 94]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 94]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:41:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:41:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:41:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:41:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:41:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:41:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:41:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:41:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 98]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 98]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:41:53 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 98], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:41:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 98]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 98]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:41:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:41:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 99]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 99]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:41:53 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 99], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:41:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 99]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 99]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:41:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:41:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 100]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 100]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:41:53 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 100], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:41:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 100]] Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 100]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:41:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:41:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:41:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:41:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:41:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:41:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (6.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:42:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:42:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 104]] Adherent::Adhesion Load (1.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 104]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:42:15 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 104], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:42:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 104]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 104]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:42:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:42:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 105]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 105]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:42:15 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 105], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:42:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 105]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 105]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:42:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:42:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 106]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 106]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:42:15 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 106], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:42:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 106]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 106]]  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:42:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:42:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:42:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:42:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:42:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:42:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (6.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:42:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:42:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 110]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 110]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:42:22 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 110], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:42:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 110]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 110]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:42:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:42:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 111]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 111]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:42:22 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 111], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:42:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 111]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 111]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:42:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:42:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 112]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 112]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:42:22 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 112], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:42:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 112]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 112]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.7ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.8ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:42:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:42:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:42:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:42:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:42:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:42:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:51:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:51:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:51:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:51:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:51:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:51:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:51:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:51:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 119]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 119]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:51:59 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 119], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:51:59 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 119]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 119]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:51:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:51:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 120]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 120]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:51:59 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 120], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:51:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 120]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 120]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:51:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:51:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 121]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 121]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:51:59 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 121], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:51:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 121]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 121]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:52:09 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:52:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:52:09 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:52:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.7ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:52:09 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:52:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:52:09 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:52:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 125]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 125]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:52:09 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 125], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:52:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 125]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 125]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:52:09 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:52:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 126]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 126]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:52:09 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 126], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:52:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 126]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 126]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:52:09 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:52:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 127]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 127]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:52:09 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 127], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:52:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 127]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 127]]  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (3.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:52:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:52:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:52:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:52:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:52:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:52:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:52:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:52:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 131]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 131]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:52:48 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 131], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:52:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 131]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 131]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:52:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:52:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 132]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 132]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:52:48 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 132], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:52:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 132]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 132]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:52:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:52:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 133]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 133]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:52:48 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 133], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:52:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 133]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 133]]  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sun, 12 Apr 2015 05:55:21 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:55:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:55:21 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:55:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:55:21 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:55:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:55:21 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:55:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 137]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 137]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:55:21 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 137], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:55:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 137]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 137]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:55:21 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:55:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 138]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 138]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:55:21 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 138], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:55:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 138]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 138]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:55:21 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sun, 12 Apr 2015 05:55:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 139]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 139]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:55:21 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 139], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:55:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 139]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 139]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (4.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 40], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 40], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 140], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 141], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 40]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 141], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]] Adherent::Adhesion Load (2.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 141]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 75]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 75], ["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["payment_id", 7], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 140]] Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 40]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 140], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 140]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 74]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 74], ["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["payment_id", 8], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 41], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 41], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 142], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 143], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 143]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 41]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 143], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 143]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 77]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 77], ["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["payment_id", 9], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 143]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 41]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 143], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 143]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 77]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 77], ["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["payment_id", 10], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 41]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 142], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 142]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 76]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 76], ["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["payment_id", 11], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 42], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 42], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 144], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 145], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 145]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 42]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 145], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 145]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 79]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 79], ["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["payment_id", 12], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 1], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 80]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 80], ["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["payment_id", 1], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 80]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 80]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 1], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 81]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 81], ["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["payment_id", 1], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 1], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 82]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 82], ["amount", #], ["created_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00], ["payment_id", 1], ["updated_at", Sun, 12 Apr 2015 05:56:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 82]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (6.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 43], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 43], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 146], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 147], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 147]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 43]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 147], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" right join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 147]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (2.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 147]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 43]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 147], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" right join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 147]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 146]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 43]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 146], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" right join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 146]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" right join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (1.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 44], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 44], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 148], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 149], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 149]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 44]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 149], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]] Adherent::Adhesion Load (2.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" right join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 149]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" right join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (3.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 45) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 45], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 45) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 45) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 45], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 150], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 151], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 151]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 45]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 151], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" right join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 151]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 150]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 45]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 150], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" right join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 150]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" right join adherent_reglements on adherent_reglements.adhesion_id = adherent_adhesions.id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.3ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 1], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 89]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 89], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["payment_id", 1], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 1], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 90]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 90], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["payment_id", 1], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 90]]  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 1], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 91]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 91], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00], ["payment_id", 1], ["updated_at", Sun, 12 Apr 2015 06:04:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 91]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 91]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.9ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (4.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 46], ["updated_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 46], ["updated_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 152], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 153], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 153]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 46]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 153], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 153]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 93]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 93], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00], ["payment_id", 19], ["updated_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (1.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 47], ["updated_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 47], ["updated_at", Sun, 12 Apr 2015 06:05:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 154], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 155], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 155]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 47]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 155], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 155]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 95]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 95], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["payment_id", 20], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 47]] SQL (0.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 154], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 154]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 94]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 94], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["payment_id", 21], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 48], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 48], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 156], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 157], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 48]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 157], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 157]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 97]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 97], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["payment_id", 22], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 48]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 157], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 157]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 97]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 97], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["payment_id", 23], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 156]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 48]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 156], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 156]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 96]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 96], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["payment_id", 24], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 1], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 98]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 98], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["payment_id", 1], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 98]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 1], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 99]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 99], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["payment_id", 1], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 99]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 99]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 1], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 100]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 100], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00], ["payment_id", 1], ["updated_at", Sun, 12 Apr 2015 06:05:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (7.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 49], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 49], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 158], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 159], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 49]] SQL (2.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 159], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > reglements_amount OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 159]] PG::UndefinedColumn: ERREUR: la colonne « reglements_amount » n'existe pas LINE 1: ...sions.amount > 0 AND (adherent_adhesions.amount > reglements... ^ : SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > reglements_amount OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 50], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 50], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 160], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 161], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 161]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 50]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 161], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > reglements_amount OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 161]] PG::UndefinedColumn: ERREUR: la colonne « reglements_amount » n'existe pas LINE 1: ...sions.amount > 0 AND (adherent_adhesions.amount > reglements... ^ : SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > reglements_amount OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 51], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 51], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 162], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 163], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 163]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 51]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 163], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > reglements_amount OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 163]] PG::UndefinedColumn: ERREUR: la colonne « reglements_amount » n'existe pas LINE 1: ...sions.amount > 0 AND (adherent_adhesions.amount > reglements... ^ : SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > reglements_amount OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 1], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 107]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 107], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["payment_id", 1], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 107]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 107]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 1], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 108]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 108], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["payment_id", 1], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 1], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 109]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 109], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00], ["payment_id", 1], ["updated_at", Sun, 12 Apr 2015 06:06:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 109]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.6ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (4.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 52], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 52], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 164], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 165], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 165]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 52]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 165], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]] Adherent::Adhesion Load (2.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 165]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 111]] SQL (3.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 111], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["payment_id", 28], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 164]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 52]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 164], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 164]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 110]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 110], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["payment_id", 29], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 53], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 53], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 166], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 167], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 167]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 53]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 167], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 167]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 113]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 113], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["payment_id", 30], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 167]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 53]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 167], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 167]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 113]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 113], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["payment_id", 31], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 166]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 53]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 166], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 166]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 112]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 112], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["payment_id", 32], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 54], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 54], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 168], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 169], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 54]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["date", Sun, 12 Apr 2015], ["member_id", 169], ["mode", "CB"], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 169]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 115]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 115], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["payment_id", 33], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 1], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 116]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 116], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["payment_id", 1], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 116]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 116]]  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 1], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 117]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 117], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["payment_id", 1], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["from_date", Sun, 12 Apr 2015], ["member_id", 1], ["to_date", Mon, 11 Apr 2016], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 118]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 118], ["amount", #], ["created_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00], ["payment_id", 1], ["updated_at", Sun, 12 Apr 2015 06:06:49 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 118]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (1.0ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN SQL (2.0ms) DELETE FROM "adherent_members" SQL (1.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (28.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (13.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 05:53:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 05:53:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 05:54:00 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 05:54:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]] SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 05:56:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 05:56:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 3 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 05:56:04 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 3], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 05:56:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 5: WHERE a.attrelid = '"adherent_query_members"'... ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"adherent_query_members"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.4ms) ROLLBACK ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (1.5ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateQueryMember (20150412145762)  (0.2ms) BEGIN  (0.2ms) DROP VIEW IF EXISTS adherent_query_members SQL (0.7ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '20150412145762'  (51.4ms) COMMIT ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateQueryMember (20150412145762)  (0.3ms) BEGIN  (66.7ms) CREATE OR REPLACE VIEW adherent_query_members AS SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id;  SQL (1.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150412145762"]]  (28.8ms) COMMIT ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.3ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (9.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:02:46 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:02:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 4 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:02:46 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 4], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:02:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.2ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (7.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:05:47 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:05:47 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 5 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:05:47 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 5], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:05:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:05:47 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:05:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 6]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 6 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:05:47 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 6], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:05:47 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (8.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:10:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:10:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 7]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 7 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:10:28 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 7], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:10:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:10:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:10:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 8]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 8 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:10:28 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 8], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:10:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:10:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:10:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 9]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 9 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:10:28 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 9], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:10:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (8.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:11:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:11:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 10]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 10 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:11:11 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 10], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:11:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:11:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:11:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 11]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 11 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:11:11 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 11], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:11:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:11:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:11:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 12]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 12 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:11:11 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 12], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:11:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 12 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:11:11 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 12], ["to_date", Sun, 01 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:11:11 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:11:11 UTC +00:00], ["from_date", Mon, 02 Feb 2015], ["member_id", 12], ["to_date", Sun, 01 Mar 2015], ["updated_at", Mon, 13 Apr 2015 06:11:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (2.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (7.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:12:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:12:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 13]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 13 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:12:12 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 13], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:12:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:12:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:12:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 14]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 14 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:12:12 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 14], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:12:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:12:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:12:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 15]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 15 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:12:12 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 15], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:12:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 15 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:12:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 15], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 06:12:12 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:12:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 15], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:12:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (6.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:12:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:12:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 16]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 16 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:12:41 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 16], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:12:41 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:12:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:12:41 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 17]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 17 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:12:41 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 17], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:12:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:12:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:12:41 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 18]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 18 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:12:41 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 18], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:12:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 18 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:12:41 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 18], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 06:12:41 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:12:41 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 18], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:12:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (7.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:13:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 19]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 19 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:13:14 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 19], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:13:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 20]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 20 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:13:14 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 20], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:13:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:13:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 21]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 21 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:13:14 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 21], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 21 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:13:14 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 21], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 06:13:14 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:13:14 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 21], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:13:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 22]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 22 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 22], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.8ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 23]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 23 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 23], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 24]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 24 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 24], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 24 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 24], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 24], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 25]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 25 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 25], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 25 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 25], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 25], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:18:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 26]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 26 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 26], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 27]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 27 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 27], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 28]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 28 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 28], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 28 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 28], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00]] SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 28], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 29]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 29 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 29], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 29 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 29], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 29], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:18:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 29 AND "adherent_members"."organism_id" = 1) LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]]  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (7.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 30]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 30 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 30], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 31]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 31 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 31], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 32]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 32 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 32], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 32 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 32], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 32], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 33]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 33 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 33], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:21:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 33 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:21:14 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 33], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 06:21:14 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:21:14 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 33], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:21:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (7.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 34]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 34 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 34], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.9ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 35]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 35 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 35], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 36]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 36 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 36], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 36 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 36], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 36], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 37]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 37 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 37], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 37 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 37], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 37], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:21:30 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:21:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:21:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 38]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 38 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:21:55 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 38], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:21:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.7ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:21:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:21:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 39]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 39 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:21:55 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 39], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:21:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.9ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.8ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:21:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:21:55 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 40]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 40 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:21:55 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 40], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:21:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 40 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:21:56 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 40], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 06:21:56 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:21:56 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 40], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:21:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:21:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:21:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 41]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 41 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:21:56 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 41], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:21:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 41 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:21:56 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 41], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 06:21:56 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:21:56 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 41], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:21:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "adherent_payments" SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (7.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 42]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 42 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 42], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.1ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 43]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 43 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 43], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 44]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 44 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 44], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 44 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 44], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 44], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 45]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 45 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 45], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 45 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 45], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 45], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:23:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 45]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]]  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (8.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 46]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 46 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 46], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 47]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 47 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 47], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 48]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 48 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 48], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 48 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 48], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 48], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 49]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 49 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 49], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 49 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 49], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 49], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:23:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 49]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (2.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (8.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 50]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 50 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 50], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 51]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 51 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 51], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 52]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 52 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 52], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 52 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 52], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 52], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 53]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 53 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 53], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 53 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 53], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 53], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 06:24:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (8.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 54]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 54 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 54], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 55]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 55 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 55], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 56]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 56 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 56], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 56 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 56], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 56], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 57]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 57 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 57], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 57 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 57], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 57], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 57], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 57]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 57]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 43]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 43], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00], ["payment_id", 1], ["updated_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 44]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 44], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00], ["payment_id", 1], ["updated_at", Mon, 13 Apr 2015 08:08:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (7.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 58]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 58 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 58], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 59]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 59 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 59], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 60]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 60 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 60], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 60 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 60], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 60], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 61]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 61 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 61], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 61 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 61], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 61], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 61], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 61]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 61]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 47]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 47], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00], ["payment_id", 2], ["updated_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 48], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00], ["payment_id", 2], ["updated_at", Mon, 13 Apr 2015 08:08:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (8.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 62]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 62 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 62], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 63]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 63 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 63], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 64]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 64 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 64], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 64 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 64], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 64], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 65]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 65 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 65], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 65 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 65], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 65], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 65], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 65]] Adherent::Adhesion Load (2.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 65]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 51]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 51], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00], ["payment_id", 3], ["updated_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 52]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 52], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00], ["payment_id", 3], ["updated_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 65]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 51], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00], ["payment_id", 3], ["updated_at", Mon, 13 Apr 2015 08:10:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (7.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:12:09 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:12:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 66]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 66 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 66], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.1ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 67]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 67 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 67], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 68]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 68 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 68], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 68 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 68], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 68], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 69]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 69 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 69], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 69 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 69], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 69], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 69], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00]] Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 69]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 69]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00], ["payment_id", 4], ["updated_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 56]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 56], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00], ["payment_id", 4], ["updated_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 69]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00], ["payment_id", 4], ["updated_at", Mon, 13 Apr 2015 08:12:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (8.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:14:44 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:14:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 70]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 70 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 70], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 71]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 71 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 71], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 72]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 72 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 72], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 72 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 72], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 72], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 73]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 73 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 73], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 73 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 73], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 73], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 73], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 73]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 73]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 59], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["payment_id", 5], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 60], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["payment_id", 5], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 73]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 59], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["payment_id", 5], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 74]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 74 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 74], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 74 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 74], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 74], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 74], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 74]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 74]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 61]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 61], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["payment_id", 6], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 62], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["payment_id", 6], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 74]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 61], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00], ["payment_id", 6], ["updated_at", Mon, 13 Apr 2015 08:14:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (8.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 75]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 75 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 75], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 76]]  (1.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 76 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 76], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 77]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 77 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 77], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 77 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 77], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 77], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 78]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 78 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 78], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 78 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 78], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 78], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 78], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 78]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 78]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]] SQL (2.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 65], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["payment_id", 7], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 66]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 66], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["payment_id", 7], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 78]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 65], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["payment_id", 7], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 79]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 79 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 79], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 79 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 79], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 79], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 79], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 79]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 79]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 67]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 67], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["payment_id", 8], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 68]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 68], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["payment_id", 8], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 79]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 67], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00], ["payment_id", 8], ["updated_at", Mon, 13 Apr 2015 08:15:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 79]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 79]] SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (7.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 80]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 80 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 80], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.9ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 81]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 81 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 81], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 82]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 82 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 82], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 82 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 82], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 82], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 83]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 83 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 83], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 83 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 83], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 83], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 83], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:15:48 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 83]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 83]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 71], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00], ["payment_id", 9], ["updated_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 72]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 72], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00], ["payment_id", 9], ["updated_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 83]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 71], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00], ["payment_id", 9], ["updated_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 83]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 83]] SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 84]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 84 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 84], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 84 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 84], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 84], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 84], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 84]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 84]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 73]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 73], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00], ["payment_id", 10], ["updated_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 74]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 74], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00], ["payment_id", 10], ["updated_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 84]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 73], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00], ["payment_id", 10], ["updated_at", Mon, 13 Apr 2015 08:15:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (8.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 85]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 85 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 85], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 86]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 86 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 86], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 87]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 87 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 87], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 87 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 87], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 87], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 88]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 88 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 88], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 88 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 88], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 88], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 88], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 88]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 88]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 77]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 77], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["payment_id", 11], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 78]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 78], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["payment_id", 11], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 88]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 77], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["payment_id", 11], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 89]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 89 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 89], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 89 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 89], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 89], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 89], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 89]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 89]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 79]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 79], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["payment_id", 12], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 80]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 80], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["payment_id", 12], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 89]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 79], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00], ["payment_id", 12], ["updated_at", Mon, 13 Apr 2015 08:16:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 89]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 89]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (7.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:17:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:17:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 90]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 90 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 90], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 91]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 91 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 91], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 92]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 92 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 92], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 92 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 92], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 92], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 93]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 93 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 93], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 93 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 93], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 93], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 93], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 93]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 93]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 83]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 83], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["payment_id", 13], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 84]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 84], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["payment_id", 13], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 93]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 83], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["payment_id", 13], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 94]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 94 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 94], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 94 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 94], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 94], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 94], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 94]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 94]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 85]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 85], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["payment_id", 14], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 86]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 86], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["payment_id", 14], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 94]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 85], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00], ["payment_id", 14], ["updated_at", Mon, 13 Apr 2015 08:17:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 94]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 94]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (7.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:17:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:17:56 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 95]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 95 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:17:56 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 95], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:17:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 96]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 96 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 96], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 97]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 97 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 97], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 97 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 97], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 97], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 98]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 98 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 98], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 98 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 98], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 98], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 98], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]] Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 98]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 98]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 89]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 89], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["payment_id", 15], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 90]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 90], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["payment_id", 15], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 98]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 89], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["payment_id", 15], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 98]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 98]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 99]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 99 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 99], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 99 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 99], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 99], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 99], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 99]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 99]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 91]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 91], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["payment_id", 16], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 92]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 92], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["payment_id", 16], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 99]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 91], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00], ["payment_id", 16], ["updated_at", Mon, 13 Apr 2015 08:17:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (7.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 100]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 100 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 100], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.7ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 101]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 101 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 101], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 102]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 102 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 102], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 102 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 102], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 102], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.7ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 103]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 103 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 103], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 103 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 103], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 103], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 103], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 103]] Adherent::Adhesion Load (2.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 103]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 95]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 95], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["payment_id", 17], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 103]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 95], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["payment_id", 17], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 104]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 104 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 104], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 104 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 104], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 104], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 104], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 104]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 104]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 97]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 97], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["payment_id", 18], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 104]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 97], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00], ["payment_id", 18], ["updated_at", Mon, 13 Apr 2015 08:19:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 104]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 104]] Adherent::Reglement Load (1.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (8.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 105]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 105 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 105], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.2ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.9ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 106]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 106 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 106], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 107]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 107 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 107], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 107 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 107], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 107], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 108]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 108 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 108], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 108 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 108], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 108], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 108], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 108]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 108]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 101]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 101], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["payment_id", 19], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 108]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 101], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["payment_id", 19], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 108]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 108]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 109]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 109 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 109], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 109 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 109], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 109], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 109], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 109]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 109]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 103]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 103], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["payment_id", 20], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 109]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 103], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00], ["payment_id", 20], ["updated_at", Mon, 13 Apr 2015 08:19:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.9ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (8.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 110]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 110 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 110], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 111]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 111 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 111], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 112]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 112 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 112], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 112 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 112], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 112], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 113]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 113 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 113], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 113 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 113], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 113], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 113], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 113]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 113]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 107]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 107], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["payment_id", 21], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 113]] Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 114]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 114 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 114], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 114 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 114], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 114], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 114], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 114]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 114]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 109]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 109], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00], ["payment_id", 22], ["updated_at", Mon, 13 Apr 2015 08:25:41 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 [["member_id", 114]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 114]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 114]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (7.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (2.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 115]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 115 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 115], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.9ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 116]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 116 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 116], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 117]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 117 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 117], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 117 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 117], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 117], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 118]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 118 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 118], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 118 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 118], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 118], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 118], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 118]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 118]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 113]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 113], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["payment_id", 23], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 118], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 118]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 118]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 113]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 113], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["payment_id", 24], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 114]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 114], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["payment_id", 24], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 119]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 119 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 119], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 119 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 119], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]] SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 119], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 119], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 119]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 119]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 115]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 115], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["payment_id", 25], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 119]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 119]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 120]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 120 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 120], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 120 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 120], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 120], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 120], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 120]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 117]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 117], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00], ["payment_id", 26], ["updated_at", Mon, 13 Apr 2015 08:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (8.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 121]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 121 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 121], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (1.2ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.7ms) DELETE FROM "adherent_coords"  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 122]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 122 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 122], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 123]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 123 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 123], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 123 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 123], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 123], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 124]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 124 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 124], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 124 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 124], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 124], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 124], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 124]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 124]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 121]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 121], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["payment_id", 27], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 124]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 124]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 125]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 125 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 125], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 125 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 125], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 125], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 125], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 125]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 125]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 123]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 123], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["payment_id", 28], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 125], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 125]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 125]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 123]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 123], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["payment_id", 29], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 124]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 124], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["payment_id", 29], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 126]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 126 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 126], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 126 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 126], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 126], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 126], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 126]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 125]] SQL (0.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 125], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["payment_id", 30], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 126], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:28:50 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 126]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 125]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 125], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:51 UTC +00:00], ["payment_id", 31], ["updated_at", Mon, 13 Apr 2015 08:28:51 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 126]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 126], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:51 UTC +00:00], ["payment_id", 31], ["updated_at", Mon, 13 Apr 2015 08:28:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:28:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:28:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 127]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 127 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:28:51 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 127], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:28:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 127 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:51 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 127], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:28:51 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:51 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 127], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:28:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:51 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 127], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:28:51 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 127]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 127]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 127], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:28:51 UTC +00:00], ["payment_id", 32], ["updated_at", Mon, 13 Apr 2015 08:28:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (7.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 128]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 128 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 128], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 129]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 129 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 129], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 130]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 130 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 130], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 130 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 130], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 130], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 131]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 131 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 131], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 131 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 131], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 131], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 131], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 131]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 131]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 131]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 131], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["payment_id", 33], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 131], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 131]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 131]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 131]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 131], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["payment_id", 34], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 132]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 132], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["payment_id", 34], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.7ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 132]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 132 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 132], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 132 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 132], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 132], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 132], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 132]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 133]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 133], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["payment_id", 35], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 132]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 132]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 133]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 133 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 133], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 133 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 133], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 133], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 133], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 133]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 135]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 135], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["payment_id", 36], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 133], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]] Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 133]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 135]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 135], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["payment_id", 37], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 136]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 136], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["payment_id", 37], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.2ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 134]]  (1.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 134 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 134], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 134 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 134], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 134], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 134], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 134]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 134]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 137]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 137], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00], ["payment_id", 38], ["updated_at", Mon, 13 Apr 2015 08:29:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (7.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 135]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 135 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 135], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.1ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 136]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 136 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 136], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 137]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 137 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 137], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 137 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 137], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 137], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 138]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 138 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 138], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 138 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 138], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 138], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 138], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 138]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 141]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 141], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["payment_id", 39], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 138], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 138]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 141]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 141], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["payment_id", 40], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 142]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 142], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["payment_id", 40], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 139]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 139 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 139], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 139 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 139], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 139], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 139], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 139]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 139]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 143]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 143], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["payment_id", 41], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 139], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 139]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 139]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 143]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 143], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["payment_id", 42], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 144]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 144], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["payment_id", 42], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 139], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 139]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 139]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 144]] SQL (0.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 144], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["payment_id", 43], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (1.8ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 140]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 140 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 140], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 140 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 140], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]] SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 140], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 140], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 140]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 140]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 145]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 145], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["payment_id", 44], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 140]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 140]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 141]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 141 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 141], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 141 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 141], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 141], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 141], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 141]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 147]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 147], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00], ["payment_id", 45], ["updated_at", Mon, 13 Apr 2015 08:30:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (7.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 142]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 142 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 142], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 143]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 143 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 143], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 144]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 144 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 144], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 144 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 144], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]] SQL (0.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 144], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 145]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 145 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 145], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 145 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 145], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 145], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 145], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 145]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 145]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 151]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 151], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["payment_id", 46], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 145], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 145]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 145]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 151]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 151], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["payment_id", 47], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 152]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 152], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["payment_id", 47], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 145], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 145]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 145]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 152]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 152], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["payment_id", 48], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 146]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 146 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 146], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 146 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 146], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 146], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 146], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 146]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 146]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 153]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 153], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["payment_id", 49], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 146], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 146]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 146]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 153]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 153], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["payment_id", 50], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 154]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 154], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["payment_id", 50], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 147]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 147 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 147], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 147 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 147], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 147], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 147], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 147]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 147]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 155]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 155], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["payment_id", 51], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 148]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 148 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 148], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 148 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 148], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 148], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 148], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 148]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 148]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 157]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 157], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["payment_id", 52], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 148], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 148]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 148]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 157]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 157], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["payment_id", 53], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 158]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 158], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["payment_id", 53], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 149]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 149 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 149], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 149 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 149], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]] SQL (0.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 149], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 149], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 149]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 149]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 159]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 159], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00], ["payment_id", 54], ["updated_at", Mon, 13 Apr 2015 08:32:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 149]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 149]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (7.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:33:44 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:33:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 150]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 150 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 150], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 151]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 151 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 151], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 152]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 152 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 152], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 152 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 152], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 152], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 153]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 153 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 153], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 153 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 153], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 153], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 153], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 153]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 153]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 163]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 163], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["payment_id", 55], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 153], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 153]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 153]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 163]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 163], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["payment_id", 56], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 164]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 164], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["payment_id", 56], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 153], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 153]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 153]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 164]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 164], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["payment_id", 57], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.6ms) DELETE FROM "adherent_adhesions" SQL (1.1ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 154]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 154 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 154], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 154 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 154], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 154], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 154], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 154]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 165]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 165], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["payment_id", 58], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 154], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 154]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 165]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 165], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["payment_id", 59], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 166]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 166], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["payment_id", 59], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 155]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 155 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 155], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 155 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 155], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 155], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 155], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 155]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 155]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 167]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 167], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["payment_id", 60], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 155]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 155]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 156]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 156 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 156], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 156 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 156], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 156], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 156], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 156]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 156]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 169]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 169], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["payment_id", 61], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 157]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 157 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 157], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 157 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 157], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 157], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 157], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 157]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 171]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 171], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["payment_id", 62], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 157], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 157]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 171]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 171], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["payment_id", 63], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 172]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 172], ["amount", #], ["created_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00], ["payment_id", 63], ["updated_at", Mon, 13 Apr 2015 08:33:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 158]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 158 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 158], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (1.1ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.7ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 159]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 159 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 159], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 160]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 160 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 160], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 160 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 160], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 160], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 161]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 161 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 161], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 161 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 161], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 161], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 161], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 161]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 161]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 175]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 175], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["payment_id", 64], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 161]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 161]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.2ms) DELETE FROM "adherent_payments" SQL (1.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (1.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 162]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 162 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 162], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 162 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 162], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 162], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 162], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 162]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 162]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 177]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 177], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["payment_id", 65], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 162], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 162]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 162]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 177]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 177], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["payment_id", 66], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 178]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 178], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["payment_id", 66], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 163]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 163 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 163], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 163 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 163], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 163], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 163], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 163]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 163]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 179]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 179], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["payment_id", 67], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 163], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 163]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 163]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 179]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 179], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["payment_id", 68], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 180]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 180], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["payment_id", 68], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 164]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 164 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 164], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 164 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 164], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 164], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 164], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 164]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 164]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 181]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 181], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["payment_id", 69], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 164], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]] Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 164]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 164]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 181]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 181], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["payment_id", 70], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 182]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 182], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["payment_id", 70], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 164], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 164]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 164]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 182]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 182], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["payment_id", 71], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (1.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 165]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 165 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 165], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 165 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 165], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 165], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 165], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 165]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 165]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 183]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 183], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["payment_id", 72], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 166]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 166 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 166], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:19:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 167]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 167 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 167], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.2ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.6ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 168]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 168 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 168], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 169]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 169 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 169], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 169 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 169], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 169], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 170]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 170 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 170], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 170 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 170], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 170], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 170], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 170]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 170]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 187]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 187], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00], ["payment_id", 73], ["updated_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 171]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 171 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 171], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 171 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 171], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 171], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 171], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 171]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 171]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 189]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 189], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["payment_id", 74], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 171], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 171]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 171]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 189]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 189], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["payment_id", 75], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 190]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 190], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["payment_id", 75], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 172]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 172 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 172], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 172 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 172], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 172], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 172], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 172]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 191]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 191], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["payment_id", 76], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 172], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 172]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 191]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 191], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["payment_id", 77], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 192]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 192], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["payment_id", 77], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 172], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 172]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 192]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 192], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["payment_id", 78], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 173]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 173 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 173], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 173 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 173], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 173], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 173], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 173]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 173]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 193]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 193], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["payment_id", 79], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 173], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 173]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 173]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 193]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 193], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["payment_id", 80], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 194]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 194], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["payment_id", 80], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 174]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 174 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 174], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 174 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 174], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 174], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 174], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 174]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 174]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 195]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 195], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["payment_id", 81], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 174]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 174]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 175]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 175 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 175], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:20:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:20:31 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:20:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 176]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 176 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:20:31 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 176], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:20:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 177]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 177 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 177], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 178]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 178 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 178], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 179]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 179 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 179], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 179 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 179], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 179], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 180]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 180 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 180], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 180 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 180], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 180], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 180], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 180]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 180]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 199]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 199], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["payment_id", 82], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 180]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 180]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 181]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 181 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 181], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 181 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 181], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 181], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 181], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 181]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 201]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 201], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["payment_id", 83], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 181], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 181]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 201]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 201], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["payment_id", 84], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 202]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 202], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["payment_id", 84], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 182]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 182 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 182], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 182 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 182], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 182], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 182], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 182]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 182]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 203]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 203], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["payment_id", 85], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 183]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 183 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 183], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 183 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 183], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 183], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 183], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 183]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 183]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 205]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 205], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["payment_id", 86], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 183], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 183]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 183]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 205]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 205], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["payment_id", 87], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 206]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 206], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["payment_id", 87], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 183], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 183]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 183]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 206]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 206], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["payment_id", 88], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 184]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 184 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 184], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 184 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 184], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 184], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 184], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 184]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 184]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 207]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 207], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["payment_id", 89], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 184], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 184]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 184]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 207]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 207], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["payment_id", 90], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 208]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 208], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00], ["payment_id", 90], ["updated_at", Mon, 13 Apr 2015 17:20:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 185]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 185 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 185], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.1ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 186]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 186 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 186], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 187]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 187 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 187], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 187 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 187], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 187], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 188]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 188 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 188], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 188 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 188], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 188], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 188], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 188]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 188]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 211]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 211], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["payment_id", 91], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 188], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 188]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 188]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 211]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 211], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["payment_id", 92], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 212]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 212], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["payment_id", 92], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.7ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 189]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 189 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 189], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 189 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 189], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 189], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 189], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 189]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 189]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 213]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 213], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["payment_id", 93], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.7ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 189], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 189]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 189]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 213]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 213], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["payment_id", 94], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 214]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 214], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["payment_id", 94], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 190]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 190 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 190], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 190 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 190], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 190], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 190], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 190]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 190]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 215]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 215], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["payment_id", 95], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (2.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 190]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 190]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.7ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 191]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 191 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 191], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 191 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 191], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 191], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 191], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 191]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 191]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 217]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 217], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["payment_id", 96], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 192]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 192 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 192], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 192 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 192], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 192], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 192], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 192]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 192]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 219]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 219], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["payment_id", 97], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 192], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]] Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 192]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 192]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 219]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 219], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["payment_id", 98], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 220]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 220], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["payment_id", 98], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 192], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 192]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 192]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 220]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 220], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["payment_id", 99], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 193]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 193 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 193], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:22:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 194]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 194 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 194], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.7ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.7ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 195]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 195 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 195], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 196]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 196 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 196], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 197]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 197 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 197], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 197 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 197], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 197], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 198]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 198 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 198], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 198 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 198], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 198], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 198], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]] Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 198]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 198]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 223]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 223], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["payment_id", 100], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 198], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 198]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 198]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 223]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 223], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["payment_id", 101], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 224]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 224], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["payment_id", 101], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 198], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 198]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 198]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 224]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 224], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["payment_id", 102], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 199]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 199 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 199], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 199 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 199], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 199], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 199], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 199]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 199]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 225]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 225], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["payment_id", 103], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 199]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 199]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 200]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 200 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 200], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 200 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 200], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 200], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 200], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 200]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 200]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 227]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 227], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["payment_id", 104], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 200], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 200]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 200]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 227]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 227], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["payment_id", 105], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 228]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 228], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["payment_id", 105], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 201]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 201 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 201], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 201 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 201], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 201], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 201], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 201]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 201]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 229]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 229], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["payment_id", 106], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 202]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 202 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 202], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 202 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 202], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 202], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 202], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 202]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 202]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 231]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 231], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["payment_id", 107], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 202], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 202]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 202]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 231]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 231], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["payment_id", 108], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 232]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 232], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00], ["payment_id", 108], ["updated_at", Mon, 13 Apr 2015 17:23:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 203]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 203 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 203], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 204]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 204 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 204], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 205]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 205 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 205], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 206]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 206 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 206], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 206 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 206], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 206], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 207]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 207 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 207], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 207 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 207], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 207], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 207], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 207]] Adherent::Adhesion Load (2.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 207]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 235]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 235], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["payment_id", 109], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 207], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 207]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 207]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 235]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 235], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["payment_id", 110], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 236]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 236], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["payment_id", 110], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.8ms) DELETE FROM "adherent_reglements" SQL (0.7ms) DELETE FROM "adherent_adhesions" SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 208]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 208 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 208], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 208 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 208], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 208], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 208], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 208]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 208]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 237]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 237], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["payment_id", 111], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 208]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 208]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.2ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 209]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 209 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 209], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 209 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 209], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 209], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 209], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 209]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 209]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 239]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 239], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["payment_id", 112], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.2ms) DELETE FROM "adherent_adhesions" SQL (0.2ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 210]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 210 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 210], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 210 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 210], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 210], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 210], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 210]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 210]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 241]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 241], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["payment_id", 113], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 210], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 210]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 210]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 241]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 241], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["payment_id", 114], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 242]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 242], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["payment_id", 114], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 210], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 210]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 210]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 242]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 242], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["payment_id", 115], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 211]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 211 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 211], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 211 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 211], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 211], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 211], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 211]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 211]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 243]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 243], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["payment_id", 116], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 211], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 211]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 211]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 243]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 243], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["payment_id", 117], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 244]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 244], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00], ["payment_id", 117], ["updated_at", Mon, 13 Apr 2015 17:23:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 212]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 212 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 212], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.1ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 213]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 213 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 213], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 214]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 214 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 214], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 214 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 214], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 214], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 215]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 215 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 215], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 215 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 215], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 215], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 215], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 215]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 215]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 247]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 247], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00], ["payment_id", 118], ["updated_at", Mon, 13 Apr 2015 17:24:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 215]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 215]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.2ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 216]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 216 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 216], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 216 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 216], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 216], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 216], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 216]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 216]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 249]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 249], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["payment_id", 119], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 216], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 216]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 216]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 249]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 249], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["payment_id", 120], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 250]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 250], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["payment_id", 120], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 216], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 216]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 216]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 250]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 250], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["payment_id", 121], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 217]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 217 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 217], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 217 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 217], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 217], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 217], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 217]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 217]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 251]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 251], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["payment_id", 122], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 218]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 218 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 218], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 218 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 218], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 218], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 218], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 218]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 218]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 253]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 253], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["payment_id", 123], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 218], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 218]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 218]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 253]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 253], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["payment_id", 124], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 254]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 254], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["payment_id", 124], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 219]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 219 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 219], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 219 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 219], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 219], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 219], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 219]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 219]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 255]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 255], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["payment_id", 125], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 219], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 219]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 219]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 255]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 255], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["payment_id", 126], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 256]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 256], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["payment_id", 126], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 220]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 220 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00], ["mail", "bonjoru@example.com"], ["member_id", 220], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:24:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 221]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 221 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 221], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 222]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 222 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 222], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 223]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 223 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 223], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 223 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 223], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 223], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 224]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 224 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 224], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 224 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 224], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 224], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 225]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 225 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 225], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 225 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 225], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 225], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:28:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 225], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 225]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 225]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 261]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 261], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["payment_id", 127], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 225], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 225]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 225]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 261]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 261], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["payment_id", 128], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 262]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 262], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["payment_id", 128], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 226]]  (1.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 226 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 226], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 226 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 226], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 226], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 226], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 226]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 226]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 263]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 263], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["payment_id", 129], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 226]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 226]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 227]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 227 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 227], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 227 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 227], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]] SQL (0.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 227], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 227], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 227]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 227]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 265]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 265], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["payment_id", 130], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 227], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 227]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 227]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 265]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 265], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["payment_id", 131], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 266]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 266], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["payment_id", 131], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 227], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 227]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 227]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 266]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 266], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["payment_id", 132], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 228]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 228 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 228], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 228 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 228], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 228], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 228], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 228]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 228]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 267]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 267], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["payment_id", 133], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 229]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 229 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 229], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 229 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 229], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 229], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 229], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 229]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 229]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 269]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 269], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["payment_id", 134], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 229], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 229]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 229]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 269]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 269], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["payment_id", 135], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 270]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 270], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00], ["payment_id", 135], ["updated_at", Mon, 13 Apr 2015 17:28:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:30:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:30:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 230]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 230 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:30:55 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 230], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:30:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 231]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 231 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 231], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 232]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 232 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 232], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 232 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 232], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 232], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 233]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 233 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 233], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 233 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 233], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 233], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 234]]  (1.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 234 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 234], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 234 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 234], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 234], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 234], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 234]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 234]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 275]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 275], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["payment_id", 136], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 234], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 234]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 234]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 275]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 275], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["payment_id", 137], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 276]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 276], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["payment_id", 137], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 235]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 235 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 235], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 235 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 235], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 235], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 235], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 235]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 235]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 277]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 277], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["payment_id", 138], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 235], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 235]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 235]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 277]] SQL (1.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 277], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["payment_id", 139], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 278]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 278], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["payment_id", 139], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 236]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 236 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 236], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 236 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 236], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 236], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 236], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 236]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 236]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 279]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 279], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["payment_id", 140], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 236]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 236]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.2ms) DELETE FROM "adherent_adhesions" SQL (0.2ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 237]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 237 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 237], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 237 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 237], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 237], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 237], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 237]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 237]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 281]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 281], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["payment_id", 141], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 237], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 237]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 237]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 281]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 281], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["payment_id", 142], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 282]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 282], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["payment_id", 142], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 237], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 237]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 237]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 282]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 282], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["payment_id", 143], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 238]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 238 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 238], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 238 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 238], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 238], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 238], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 238]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 238]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 283]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 283], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00], ["payment_id", 144], ["updated_at", Mon, 13 Apr 2015 17:30:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 239]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 239 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 239], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 240]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 240 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 240], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 241]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 241 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 241], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 241 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 241], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 241], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 242]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 242 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 242], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 242 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 242], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 242], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:31:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 243]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 243 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 243], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 243 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 243], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 243], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 243], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 243]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 243]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 289]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 289], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["payment_id", 145], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 243]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 243]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 244]]  (0.9ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 244 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 244], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 244 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 244], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 244], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 244], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 244]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 244]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 291]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 291], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["payment_id", 146], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 244], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 244]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 244]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 291]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 291], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["payment_id", 147], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 292]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 292], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["payment_id", 147], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 245]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 245 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 245], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 245 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 245], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 245], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 245], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 245]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 245]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 293]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 293], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["payment_id", 148], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 245], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 245]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 245]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 293]] SQL (1.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 293], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["payment_id", 149], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 294]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 294], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["payment_id", 149], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 245], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 245]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 245]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 294]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 294], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["payment_id", 150], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.2ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 246]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 246 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 246], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 246 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 246], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 246], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 246], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 246]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 246]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 295]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 295], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["payment_id", 151], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 247]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 247 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 247], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 247 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 247], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 247], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 247], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 247]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 247]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 297]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 297], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["payment_id", 152], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 247], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 247]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 247]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 297]] SQL (0.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 297], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["payment_id", 153], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 298]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 298], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00], ["payment_id", 153], ["updated_at", Mon, 13 Apr 2015 17:31:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.7ms) DELETE FROM "adherent_reglements" SQL (0.6ms) DELETE FROM "adherent_adhesions" SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (6.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 248]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 248 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 248], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 249]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 249 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 249], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 250]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 250 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 250], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 250 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 250], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 250], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 251]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 251 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 251], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 251 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 251], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 251], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 251], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 251]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 251]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 301]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 301], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["payment_id", 154], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 251], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 251]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 251]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 301]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 301], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["payment_id", 155], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 302]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 302], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["payment_id", 155], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 252]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 252 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 252], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 252 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 252], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 252], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 252], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 252]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 252]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 303]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 303], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["payment_id", 156], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 252], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 252]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 252]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 303]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 303], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["payment_id", 157], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 304]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 304], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["payment_id", 157], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 253]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 253 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 253], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 253 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 253], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 253], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 253], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 253]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 253]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 305]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 305], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["payment_id", 158], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 254]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 254 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 254], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 254 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 254], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 254], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 254], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 254]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 254]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 307]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 307], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["payment_id", 159], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 254], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 254]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 254]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 307]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 307], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["payment_id", 160], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 308]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 308], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["payment_id", 160], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 254], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 254]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 254]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 308]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 308], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["payment_id", 161], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 255]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 255 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 255], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 255 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 255], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 255], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 255], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 255]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 255]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 309]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 309], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["payment_id", 162], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 255]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 255]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 256]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 256 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 256], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 256 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 256], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 256], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:33:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 257]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 257 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:33:03 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 257], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:33:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 257 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:03 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 257], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:33:03 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:33:03 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 257], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:33:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 258]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 258 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 258], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 259]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 259 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 259], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 260]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 260 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 260], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 260 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 260], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 260], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 261]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 261 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 261], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 261 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 261], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 261], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 261], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 261]] Adherent::Adhesion Load (3.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 261]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 317]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 317], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00], ["payment_id", 163], ["updated_at", Mon, 13 Apr 2015 17:35:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.2ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 262]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 262 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 262], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 262 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 262], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 262], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 262], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 262]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 262]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 319]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 319], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["payment_id", 164], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 262], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 262]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 262]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 319]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 319], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["payment_id", 165], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 320]] SQL (0.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 320], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["payment_id", 165], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 263]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 263 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 263], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 263 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 263], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 263], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 263], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 263]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 263]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 321]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 321], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["payment_id", 166], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 263]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 263]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 264]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 264 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 264], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 264 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 264], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 264], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 264], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 264]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 264]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 323]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 323], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["payment_id", 167], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 264], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 264]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 264]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 323]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 323], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["payment_id", 168], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 324]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 324], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["payment_id", 168], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.2ms) DELETE FROM "adherent_adhesions" SQL (0.2ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 265]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 265 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 265], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 265 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 265], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 265], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 265], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 265]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 265]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 325]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 325], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["payment_id", 169], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 265], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 265]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 265]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 325]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 325], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["payment_id", 170], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 326]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 326], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["payment_id", 170], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 265], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 265]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 265]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 326]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 326], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["payment_id", 171], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 266]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 266 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 266], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 266 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 266], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 266], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 267]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 267 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 267], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 267 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 267], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 267], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:35:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 268]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 268 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 268], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 269]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 269 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 269], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 270]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 270 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 270], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 270 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 270], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 270], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 271]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 271 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 271], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 271 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 271], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 271], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 272]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 272 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 272], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 272 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 272], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 272], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 273]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 273 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 273], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 273 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 273], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 273], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 273], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 273]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 273]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 337]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 337], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["payment_id", 172], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 273]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 273]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 274]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 274 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 274], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 274 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 274], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 274], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 274], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 274]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 274]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 339]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 339], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["payment_id", 173], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.7ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 275]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 275 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 275], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 275 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 275], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 275], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 275], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 275]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 275]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 341]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 341], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["payment_id", 174], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 275], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 275]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 275]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 341]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 341], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["payment_id", 175], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 342]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 342], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["payment_id", 175], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 276]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 276 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 276], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 276 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 276], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 276], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 276], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 276]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 276]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 343]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 343], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["payment_id", 176], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 276], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 276]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 276]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 343]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 343], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["payment_id", 177], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 344]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 344], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["payment_id", 177], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 276], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 276]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 276]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 344]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 344], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["payment_id", 178], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 277]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 277 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 277], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 277 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 277], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 277], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 277], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 277]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 277]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 345]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 345], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["payment_id", 179], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 277], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 277]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 277]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 345]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 345], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["payment_id", 180], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 346]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 346], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00], ["payment_id", 180], ["updated_at", Mon, 13 Apr 2015 17:38:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.6ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 278]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 278 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 278], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 279]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 279 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 279], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 280]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 280 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 280], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 280 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 280], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 280], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 281]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 281 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 281], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 281 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 281], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 281], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.7ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 282]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 282 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 282], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 282 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 282], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]] SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 282], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 283]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 283 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 283], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 283 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 283], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 283], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 283], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 283]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 283]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 353]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 353], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["payment_id", 181], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 283], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 283]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 283]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 353]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 353], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["payment_id", 182], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 354]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 354], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["payment_id", 182], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 284]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 284 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 284], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 284 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 284], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 284], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 284], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 284]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 284]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 355]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 355], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["payment_id", 183], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 284], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 284]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 284]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 355]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 355], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["payment_id", 184], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 356]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 356], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["payment_id", 184], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 285]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 285 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 285], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 285 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 285], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 285], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 285], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 285]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 285]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 357]] SQL (0.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 357], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["payment_id", 185], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 285]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 285]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.2ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 286]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 286 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 286], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 286 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 286], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 286], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 286], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 286]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 286]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 359]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 359], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["payment_id", 186], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 287]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 287 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 287], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 287 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 287], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 287], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 287], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]] Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 287]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 287]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 361]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 361], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["payment_id", 187], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 287], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]] Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 287]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 287]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 361]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 361], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["payment_id", 188], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 362]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 362], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["payment_id", 188], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 287], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 287]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 287]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 362]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 362], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00], ["payment_id", 189], ["updated_at", Mon, 13 Apr 2015 17:39:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (6.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 288]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 288 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 288], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00]]  (1.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 289]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 289 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 289], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 290]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 290 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 290], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 290 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 290], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 290], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 291]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 291 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 291], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 291 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 291], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 291], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:39:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 292]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 292 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 292], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 292 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 292], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 292], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 293]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 293 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 293], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 293 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 293], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 293], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 293], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 293]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 293]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 369]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 369], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["payment_id", 190], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 293], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 293]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 293]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 369]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 369], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["payment_id", 191], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 370]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 370], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["payment_id", 191], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 293], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 293]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 293]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 370]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 370], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["payment_id", 192], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 294]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 294 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 294], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 294 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 294], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 294], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 294], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 294]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 294]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 371]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 371], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["payment_id", 193], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 295]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 295 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 295], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 295 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 295], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 295], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 295], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 295]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 295]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 373]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 373], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["payment_id", 194], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 295], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 295]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 295]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 373]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 373], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["payment_id", 195], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 374]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 374], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["payment_id", 195], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 296]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 296 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 296], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 296 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 296], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]] SQL (0.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 296], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 296], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 296]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 296]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 375]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 375], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["payment_id", 196], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 296], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 296]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 296]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 375]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 375], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["payment_id", 197], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 376]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 376], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["payment_id", 197], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (1.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 297]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 297 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 297], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 297 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 297], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 297], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 297], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 297]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 297]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 377]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 377], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00], ["payment_id", 198], ["updated_at", Mon, 13 Apr 2015 17:39:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 297]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 297]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 298]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 298 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 298], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.1ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (1.9ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 299]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 299 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 299], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 300]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 300 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 300], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 300 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 300], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 300], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 301]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 301 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 301], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 301 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 301], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 301], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 301], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 301]] Adherent::Adhesion Load (2.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 301]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 381]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 381], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["payment_id", 199], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 302]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 302 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 302], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 302 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 302], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 302], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 302], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 302]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 302]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 383]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 383], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["payment_id", 200], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 302], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 302]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 302]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 383]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 383], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["payment_id", 201], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 384]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 384], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["payment_id", 201], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 303]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 303 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 303], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 303 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 303], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 303], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 303], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 303]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 303]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 385]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 385], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["payment_id", 202], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 303], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 303]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 303]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 385]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 385], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["payment_id", 203], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 386]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 386], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["payment_id", 203], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 303], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 303]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 303]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 386]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 386], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["payment_id", 204], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 304]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 304 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 304], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 304 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 304], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 304], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 304], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 304]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 304]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 387]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 387], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["payment_id", 205], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 304]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 304]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 305]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 305 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 305], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 305 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 305], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 305], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 305], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 305]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 305]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 389]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 389], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["payment_id", 206], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 305], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 305]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 305]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 389]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 389], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["payment_id", 207], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 390]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 390], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["payment_id", 207], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 306]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 306 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 306], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 306 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 306], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 306], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 307]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 307 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 307], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 307 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 307], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 307], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:40:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (6.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 308]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 308 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 308], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00]]  (3.7ms) RELEASE SAVEPOINT active_record_1  (2.2ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 309]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 309 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 309], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.8ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 310]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 310 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 310], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 310 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 310], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 310], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00]]  (1.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 311]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (2.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 311 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 311], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 311 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 311], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 311], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:41:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 311], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]] Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 311]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 311]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 397]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 397], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["payment_id", 208], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 311], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 311]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 311]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 397]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 397], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["payment_id", 209], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 398]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 398], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["payment_id", 209], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 312]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 312 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 312], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 312 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 312], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 312], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 312], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 312]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 312]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 399]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 399], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["payment_id", 210], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 312], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 312]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 312]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 399]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 399], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["payment_id", 211], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 400]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 400], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["payment_id", 211], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 313]]  (1.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 313 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 313], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 313 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 313], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 313], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 313], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 313]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 313]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 401]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 401], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["payment_id", 212], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 313], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 313]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 313]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 401]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 401], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["payment_id", 213], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 402]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 402], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["payment_id", 213], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 313], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 313]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 313]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 402]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 402], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["payment_id", 214], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 314]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 314 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 314], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 314 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 314], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 314], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 314], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 314]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 314]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 403]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 403], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["payment_id", 215], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 314]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 314]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 315]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 315 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 315], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 315 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 315], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]] SQL (0.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 315], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 315], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 315]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 315]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 405]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 405], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["payment_id", 216], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 316]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 316 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 316], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 316 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 316], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 316], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 317]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 317 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 317], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 317 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 317], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 317], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:41:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 318]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 318 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 318], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 319]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 319 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 319], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 320]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 320 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 320], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 320 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 320], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 320], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 321]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 321 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 321], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 321 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 321], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 321], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 321], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 321]] Adherent::Adhesion Load (2.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 321]]  (1.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 413]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 413], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["payment_id", 217], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 321], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 321]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 321]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 413]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 413], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["payment_id", 218], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 414]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 414], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["payment_id", 218], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 321], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 321]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 321]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 414]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 414], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["payment_id", 219], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 322]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 322 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 322], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 322 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 322], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 322], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 322], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 322]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 322]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 415]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 415], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["payment_id", 220], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY "adherent_adhesions"."id" ASC LIMIT 1000 [["member_id", 322]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" ASC LIMIT 1000 [["member_id", 322]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1000 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 323]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 323 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 323], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 323 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 323], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 323], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 323], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 323]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 323]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 417]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 417], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["payment_id", 221], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 323], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 323]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 323]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 417]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 417], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["payment_id", 222], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 418]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 418], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["payment_id", 222], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 324]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 324 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 324], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 324 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 324], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 324], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 324], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 324]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 324]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 419]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 419], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["payment_id", 223], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 324], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 324]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 324]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 419]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 419], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["payment_id", 224], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 420]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 420], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["payment_id", 224], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 325]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 325 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 325], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 325 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 325], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 325], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 325], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 325]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 325]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 421]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 421], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00], ["payment_id", 225], ["updated_at", Mon, 13 Apr 2015 17:42:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:42:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:42:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 326]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 326 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:42:49 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 326], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:42:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 326 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:49 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 326], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:42:49 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:49 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 326], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:42:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:42:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:42:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 327]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 327 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:42:49 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 327], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:42:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 327 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:49 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 327], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:42:49 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:42:49 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 327], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:42:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 328]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 328 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 328], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 329]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 329 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 329], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 330]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 330 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 330], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 330 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 330], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 330], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 331]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 331 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 331], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 331 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 331], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]] SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 331], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 332]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 332 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 332], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 332 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 332], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 332], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 333]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 333 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 333], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 333 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 333], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 333], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 333], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]] Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 333]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 333]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 433]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 433], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["payment_id", 226], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 334]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 334 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 334], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 334 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 334], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 334], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 334], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 334]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 334]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 435]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 435], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["payment_id", 227], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 334], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 334]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 334]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 435]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 435], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["payment_id", 228], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 436]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 436], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["payment_id", 228], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 335]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 335 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 335], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 335 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 335], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]] SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 335], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 335], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 335]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 335]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 437]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 437], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["payment_id", 229], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 335], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 335]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 335]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 437]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 437], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["payment_id", 230], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 438]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 438], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["payment_id", 230], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 336]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 336 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 336], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 336 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 336], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 336], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 336], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 336]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 336]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 439]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 439], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["payment_id", 231], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 336], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 336]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 336]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 439]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 439], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["payment_id", 232], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 440]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 440], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["payment_id", 232], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 336], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 336]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 336]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 440]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 440], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00], ["payment_id", 233], ["updated_at", Mon, 13 Apr 2015 17:43:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.7ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 337]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 337 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 337], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 338]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 338 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 338], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 339]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 339 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 339], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 339 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 339], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 339], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 340]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 340 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 340], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 340 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 340], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 340], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 340], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 340]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 340]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 443]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 443], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["payment_id", 234], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 340], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 340]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 340]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 443]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 443], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["payment_id", 235], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 444]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 444], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["payment_id", 235], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 340], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 340]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 340]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 444]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 444], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["payment_id", 236], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.7ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.7ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 341]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 341 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 341], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 341 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 341], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 341], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 341], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 341]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 341]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 445]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 445], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["payment_id", 237], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 341], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 341]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 341]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 445]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 445], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["payment_id", 238], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 446]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 446], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["payment_id", 238], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.8ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 342]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 342 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 342], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 342 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 342], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 342], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 342], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 342]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 342]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 447]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 447], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["payment_id", 239], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.9ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 343]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 343 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 343], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 343 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 343], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 343], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 343], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 343]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 343]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 449]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 449], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["payment_id", 240], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 343], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 343]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 343]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 449]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 449], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["payment_id", 241], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 450]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 450], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["payment_id", 241], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 344]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 344 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 344], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 344 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 344], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 344], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.6ms) DELETE FROM "adherent_coords"  (0.7ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 345]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 345 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 345], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 345 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 345], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 345], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:44:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 346]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 346 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 346], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 347]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 347 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 347], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 348]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 348 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 348], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 348 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 348], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 348], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 349]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 349 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 349], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 349 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 349], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 349], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 349], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 349]] Adherent::Adhesion Load (2.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 349]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 457]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 457], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["payment_id", 242], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 349], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 349]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 349]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 457]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 457], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["payment_id", 243], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 458]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 458], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["payment_id", 243], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.2ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 350]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 350 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 350], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 350 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 350], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 350], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 350], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 350]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 350]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 459]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 459], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["payment_id", 244], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.2ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 351]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 351 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 351], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 351 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 351], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]] SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 351], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 351], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 351]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 351]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 461]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 461], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["payment_id", 245], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 351], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 351]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 351]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 461]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 461], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["payment_id", 246], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 462]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 462], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["payment_id", 246], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 351], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 351]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 351]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 462]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 462], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["payment_id", 247], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 352]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 352 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 352], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 352 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 352], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 352], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 352], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 352]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 352]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 463]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 463], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["payment_id", 248], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 352], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 352]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 352]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 463]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 463], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["payment_id", 249], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 464]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 464], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["payment_id", 249], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 353]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 353 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 353], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 353 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 353], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 353], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 354]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 354 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 354], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 354 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 354], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 354], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:46:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 355]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 355 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 355], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.9ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 356]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 356 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 356], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 357]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 357 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 357], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 357 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 357], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 357], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 358]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 358 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 358], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 358 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 358], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 358], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 358], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 358]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 358]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 471]] SQL (1.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 471], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["payment_id", 250], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 358], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 358]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 358]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 471]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 471], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["payment_id", 251], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 472]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 472], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["payment_id", 251], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 358], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 358]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 358]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 472]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 472], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["payment_id", 252], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 359]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 359 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 359], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 359 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 359], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 359], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 359], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 359]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 359]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 473]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 473], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["payment_id", 253], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 360]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 360 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 360], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 360 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 360], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 360], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 360], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 360]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 360]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 475]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 475], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["payment_id", 254], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 360], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 360]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 360]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 475]] SQL (1.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 475], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["payment_id", 255], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 476]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 476], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["payment_id", 255], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.2ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 361]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 361 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 361], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 361 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 361], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 361], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 361], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 361]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 361]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 477]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 477], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["payment_id", 256], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 361], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 361]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 361]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 477]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 477], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["payment_id", 257], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 478]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 478], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["payment_id", 257], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 362]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 362 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 362], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 362 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 362], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 362], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.6ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 363]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 363 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 363], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 363 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 363], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 363], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 364]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 364 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 364], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 364 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 364], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 364], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:49:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 365]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 365 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 365], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.1ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 366]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 366 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 366], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 367]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 367 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 367], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 367 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 367], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 367], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 368]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 368 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 368], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 368 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 368], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 368], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 368], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 368]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 368]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 487]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 487], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["payment_id", 258], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 368], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 368]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 368]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 487]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 487], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["payment_id", 259], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 488]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 488], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["payment_id", 259], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 368], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 368]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 368]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 488]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 488], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["payment_id", 260], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 369]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 369 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 369], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 369 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 369], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 369], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 369], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 369]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 369]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 489]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 489], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["payment_id", 261], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 369], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 369]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 369]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 489]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 489], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["payment_id", 262], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 490]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 490], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["payment_id", 262], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.2ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 370]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 370 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 370], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 370 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 370], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 370], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 370], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 370]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 370]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 491]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 491], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["payment_id", 263], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 371]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 371 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 371], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 371 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 371], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 371], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 371], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 371]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 371]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 493]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 493], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["payment_id", 264], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 371], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 371]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 371]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 493]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 493], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["payment_id", 265], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 494]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 494], ["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["payment_id", 265], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 372]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 372 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 372], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 372 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 372], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]] SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 372], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 373]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 373 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 373], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 373 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 373], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 373], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 374]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 374 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 374], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 374 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 374], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 374], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 17:50:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (5.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/new.html.erb within layouts/adherent/application (0.3ms) Completed 200 OK in 99ms (Views: 25.5ms | ActiveRecord: 16.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 500 Internal Server Error in 22ms  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 500 Internal Server Error in 5ms  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x553c2bc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5d4b41c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"375"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.7ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.4ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"376"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/376 Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"377"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/377 Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"378"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 378 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 378 [["name", "Dalton"], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/378 Completed 302 Found in 11ms (ActiveRecord: 3.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 12], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/379/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.1ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 13], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/380/coord/new Completed 302 Found in 25ms (ActiveRecord: 3.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.9ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 14], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/381/coord/new Completed 302 Found in 11ms (ActiveRecord: 4.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.8ms | ActiveRecord: 2.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.7ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:56:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x566f382 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (4.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 27ms (ActiveRecord: 8.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5707b3c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"382"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/382 Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"383"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 7.5ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"384"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/384 Completed 302 Found in 5ms (ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"385"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 385 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 385 [["name", "Dalton"], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/385 Completed 302 Found in 11ms (ActiveRecord: 3.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 32ms (Views: 1.8ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.7ms) Adherent::QueryMember Load (2.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 27]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.6ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 29], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/386/coord/new Completed 302 Found in 25ms (ActiveRecord: 3.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 30], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/387/coord/new Completed 302 Found in 9ms (ActiveRecord: 2.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 31], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/388/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.5ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:57:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x57ffefe @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (4.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 29ms (ActiveRecord: 8.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5895fda @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 32ms (Views: 8.3ms | ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 21ms (Views: 1.8ms | ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"389"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"390"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/390 Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"391"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 391 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 391 [["name", "Dalton"], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/391 Completed 302 Found in 11ms (ActiveRecord: 3.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"392"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/392 Completed 302 Found in 5ms (ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 46], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/393/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 47], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/394/coord/new Completed 302 Found in 9ms (ActiveRecord: 2.9ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 49], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/395/coord/new Completed 302 Found in 25ms (ActiveRecord: 3.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.2ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.5ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (4.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/new.html.erb within layouts/adherent/application (0.3ms) Completed 200 OK in 75ms (Views: 7.9ms | ActiveRecord: 14.4ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 53], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/396/coord/new Completed 302 Found in 18ms (ActiveRecord: 4.2ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 54], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/397/coord/new Completed 302 Found in 9ms (ActiveRecord: 3.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 55], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/398/coord/new Completed 302 Found in 26ms (ActiveRecord: 4.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 22ms (Views: 1.7ms | ActiveRecord: 2.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.9ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.4ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.6ms | ActiveRecord: 1.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x659631a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 4ms (ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x65ab940 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"399"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/399 Completed 302 Found in 6ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"400"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"401"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/401 Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"402"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 402 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 402 [["name", "Dalton"], ["updated_at", Mon, 13 Apr 2015 17:59:40 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/402 Completed 302 Found in 11ms (ActiveRecord: 3.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (4.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/show.html.erb within layouts/adherent/application (0.3ms) Completed 200 OK in 40ms (Views: 8.8ms | ActiveRecord: 12.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.7ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.7ms | ActiveRecord: 1.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"403"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"404"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 404 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 404 [["name", "Dalton"], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/404 Completed 302 Found in 11ms (ActiveRecord: 3.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"405"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/405 Completed 302 Found in 5ms (ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"406"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/406 Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5731d10 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x57413e6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 4ms (ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 500 Internal Server Error in 31ms  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 83) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 83], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/407/coord/new Completed 302 Found in 9ms (ActiveRecord: 3.0ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 85) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 85], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/408/coord/new Completed 302 Found in 9ms (ActiveRecord: 3.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 86) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 86], ["updated_at", Mon, 13 Apr 2015 18:00:27 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/409/coord/new Completed 302 Found in 24ms (ActiveRecord: 3.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (4.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (0.3ms) Completed 200 OK in 79ms (Views: 7.9ms | ActiveRecord: 15.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 89]] Sent data Mon association-dashed_date(Date.today)-Membres.csv (28.1ms) Completed 200 OK in 36ms (Views: 27.9ms | ActiveRecord: 4.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 90) LIMIT 1 SQL (1.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 90], ["updated_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/410/coord/new Completed 302 Found in 41ms (ActiveRecord: 8.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 91) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 91], ["updated_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/411/coord/new Completed 302 Found in 29ms (ActiveRecord: 3.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 93], ["updated_at", Mon, 13 Apr 2015 18:01:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/412/coord/new Completed 302 Found in 9ms (ActiveRecord: 3.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x592fea0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 2.4ms)  (1.8ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x593f35a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.4ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.6ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.7ms | ActiveRecord: 1.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"413"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/413 Completed 302 Found in 6ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"414"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/414 Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"415"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 415 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 415 [["name", "Dalton"], ["updated_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/415 Completed 302 Found in 10ms (ActiveRecord: 3.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"416"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (4.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/new.html.erb within layouts/adherent/application (0.4ms) Completed 200 OK in 76ms (Views: 8.1ms | ActiveRecord: 15.1ms)  (0.7ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 106) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 106], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/417/coord/new Completed 302 Found in 17ms (ActiveRecord: 3.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 107) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 107], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/418/coord/new Completed 302 Found in 27ms (ActiveRecord: 3.9ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 108) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 108], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/419/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.4ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.9ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.4ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 24ms (Views: 2.4ms | ActiveRecord: 2.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as XLS Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 113]] Sent data Mon association-dashed_date(Date.today)-Membres.xls (1.8ms) Completed 200 OK in 10ms (Views: 1.7ms | ActiveRecord: 3.8ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 114]] Sent data Mon association-dashed_date(Date.today)-Membres.csv (0.4ms) Completed 200 OK in 6ms (Views: 0.2ms | ActiveRecord: 2.5ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x6051aa8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x6060f12 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 4ms (ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"420"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/420 Completed 302 Found in 5ms (ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"421"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/421 Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.9ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"422"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"423"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 423 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 423 [["name", "Dalton"], ["updated_at", Mon, 13 Apr 2015 18:01:31 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/423 Completed 302 Found in 10ms (ActiveRecord: 3.3ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (4.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/edit.html.erb within layouts/adherent/application (0.3ms) Completed 200 OK in 39ms (Views: 8.3ms | ActiveRecord: 13.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x57d7bc0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x50f0cda @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 4ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.7ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 25ms (Views: 1.5ms | ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"424"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/424 Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"425"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 425 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 425 [["name", "Dalton"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/425 Completed 302 Found in 10ms (ActiveRecord: 3.4ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"426"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"427"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/427 Completed 302 Found in 6ms (ActiveRecord: 2.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as XLS Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 135]] Sent data Mon association-13-avr-2015-Membres.xls (1.1ms) Completed 200 OK in 41ms (Views: 0.8ms | ActiveRecord: 4.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 137]] Sent data Mon association-13-avr-2015-Membres.csv (0.4ms) Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 139) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 139], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/428/coord/new Completed 302 Found in 11ms (ActiveRecord: 4.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 141) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 141], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/429/coord/new Completed 302 Found in 9ms (ActiveRecord: 3.1ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 142) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 142], ["updated_at", Mon, 13 Apr 2015 18:15:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/430/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.3ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (4.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 112ms (Views: 6.1ms | ActiveRecord: 15.5ms)  (0.7ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 1], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 501]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 501], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00], ["payment_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 501]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 1], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 502]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 502], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00], ["payment_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 1], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 503]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 503], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00], ["payment_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 503]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 503]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 144) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 144) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 144], ["updated_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 144) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 144) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 144], ["updated_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 431], ["to_date", Sat, 31 Aug 2013], ["updated_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 432], ["to_date", Sat, 31 Aug 2013], ["updated_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 432]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 144]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 432], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 432]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 505]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 505], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00], ["payment_id", 266], ["updated_at", Mon, 13 Apr 2015 18:18:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 145) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 145) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 145], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 145) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 145) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 145], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 433], ["to_date", Sat, 31 Aug 2013], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 434], ["to_date", Sat, 31 Aug 2013], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 434]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 145]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 434], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 434]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 507]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 507], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["payment_id", 267], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 434]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 145]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 434], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 434]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 507]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 507], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["payment_id", 268], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 433]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 145]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 433], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 433]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 506]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 506], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["payment_id", 269], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 146) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 146) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 146], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 146) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 146) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 146], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 435], ["to_date", Sat, 31 Aug 2013], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 436], ["to_date", Sat, 31 Aug 2013], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 436]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 146]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 436], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 436]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 509]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 509], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["payment_id", 270], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 435]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 146]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 435], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 435]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 508]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 508], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["payment_id", 271], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x68d3c3a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 3.1ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x68951f6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"13/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x68538fa @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x68538fa%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"13/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x68290a0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.5ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"13/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x67e995a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x67e995a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x678d998 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x66f1124 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x66f0418 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 154) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 154) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 154], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/437/adhesions/new" for 127.0.0.1 at 2015-04-13 20:18:04 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"437"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "437"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 437]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 437]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (94.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (24.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.2ms) Completed 200 OK in 140ms (Views: 133.0ms | ActiveRecord: 2.6ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 155) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 155) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 155], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/438/adhesions/new" for 127.0.0.1 at 2015-04-13 20:18:04 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"438"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "438"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 438]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 438]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.8ms | ActiveRecord: 2.0ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 438]] Started POST "/adherent/members/438/adhesions" for 127.0.0.1 at 2015-04-13 20:18:04 +0200 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"438"} Organism Load (1.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "438"]]  (0.5ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 438], ["to_date", Thu, 31 Jul 2014], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/438/adhesions Completed 302 Found in 15ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/438/adhesions" for 127.0.0.1 at 2015-04-13 20:18:04 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"438"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "438"]] Adherent::Adhesion Exists (1.1ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 438]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 438]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 510]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 510]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 14.9ms | ActiveRecord: 3.8ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 438]] SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 156) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 156) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 156], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 439], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/439/adhesions" for 127.0.0.1 at 2015-04-13 20:18:04 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"439"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "439"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 439]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 439]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 511]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 511]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.3ms | ActiveRecord: 2.8ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 157) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 157) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 157], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (1.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 440], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/440/adhesions" for 127.0.0.1 at 2015-04-13 20:18:04 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"440"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "440"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 440]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 440]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 512]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 512]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.7ms) Completed 200 OK in 16ms (Views: 10.5ms | ActiveRecord: 2.4ms) Started GET "/adherent/members/440/adhesions/512/edit" for 127.0.0.1 at 2015-04-13 20:18:04 +0200 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"440", "id"=>"512"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "440"]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 440], ["id", "512"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.6ms | ActiveRecord: 2.3ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 158) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 158) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 158], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 441], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/441/adhesions" for 127.0.0.1 at 2015-04-13 20:18:04 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"441"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "441"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 441]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 441]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 513]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 513]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 2.1ms) Started GET "/adherent/members/441/payments/new" for 127.0.0.1 at 2015-04-13 20:18:04 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"441"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "441"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 158]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 441]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 513]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (48.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 65ms (Views: 55.8ms | ActiveRecord: 2.4ms) SQL (0.9ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 442]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 442 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 442], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.9ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 443]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 443 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 443], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 444]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 444 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 444], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 444 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 444], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 444], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 445]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 445 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 445], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 445 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 445], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 445], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 445], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 445]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 445]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 516]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 516], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["payment_id", 272], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 446]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 446 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 446], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 446 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 446], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 446], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 446], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 446]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 446]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 518]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 518], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["payment_id", 273], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 446], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 446]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 446]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 518]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 518], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["payment_id", 274], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 519]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 519], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["payment_id", 274], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 446], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 446]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 446]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 519]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 519], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["payment_id", 275], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 447]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 447 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 447], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 447 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 447], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 447], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 447], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 447]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 447]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 520]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 520], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["payment_id", 276], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 447], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 447]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 447]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 520]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 520], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["payment_id", 277], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 521]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 521], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["payment_id", 277], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.8ms) COMMIT  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 448]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 448 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 448], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 448 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 448], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 448], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 448], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 448]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 448]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 522]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 522], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["payment_id", 278], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 448], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 448]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 448]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 522]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 522], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["payment_id", 279], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 523]] SQL (0.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 523], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["payment_id", 279], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 449]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 449 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 449], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 449 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 449], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 449], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 450]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 450 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 450], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 450 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 450], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 450], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 451]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 451 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 451], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 451 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 451], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 451], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 159) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 159) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 159], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/452/coord/new" for 127.0.0.1 at 2015-04-13 20:18:05 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"452"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "452"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 452]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (20.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 26.0ms | ActiveRecord: 1.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 160) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 160) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 160], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/453/coord/new" for 127.0.0.1 at 2015-04-13 20:18:05 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"453"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "453"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 453]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 19.8ms | ActiveRecord: 1.3ms) Started POST "/adherent/members/453/coord" for 127.0.0.1 at 2015-04-13 20:18:05 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"453"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "453"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 453]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 453], ["office", ""], ["tel", ""], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/453/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 2.7ms) Started GET "/adherent/members/453/adhesions/new" for 127.0.0.1 at 2015-04-13 20:18:05 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"453"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "453"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 453]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 453]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.9ms | ActiveRecord: 1.7ms) Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 453]]  (0.3ms) ROLLBACK  (0.4ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 161) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 161) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 161], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/454/coord/new" for 127.0.0.1 at 2015-04-13 20:18:05 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"454"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "454"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 454]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 19.8ms | ActiveRecord: 1.2ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/454/coord" for 127.0.0.1 at 2015-04-13 20:18:05 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"454"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "454"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 454]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 454], ["office", ""], ["tel", ""], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/454/adhesions/new Completed 302 Found in 8ms (ActiveRecord: 2.4ms) Started GET "/adherent/members/454/adhesions/new" for 127.0.0.1 at 2015-04-13 20:18:05 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"454"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "454"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 454]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 454]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.8ms | ActiveRecord: 1.9ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 162) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 162) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 162], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/455/coord/new" for 127.0.0.1 at 2015-04-13 20:18:05 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"455"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "455"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 455]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 20.1ms | ActiveRecord: 1.2ms) Started POST "/adherent/members/455/coord" for 127.0.0.1 at 2015-04-13 20:18:05 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"455"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "455"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 455]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 455], ["office", ""], ["tel", ""], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/455/adhesions/new Completed 302 Found in 8ms (ActiveRecord: 2.4ms) Started GET "/adherent/members/455/adhesions/new" for 127.0.0.1 at 2015-04-13 20:18:05 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"455"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "455"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 455]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 455]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.8ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 459]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 459]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 459], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 459]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 459]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 460]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 460]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 460], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 460]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 460]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 461]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 461]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 461], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 461]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 461]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 163) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 163) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 163], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 462]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 462]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 462], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/462/payments/new" for 127.0.0.1 at 2015-04-13 20:18:05 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"462"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "462"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 163]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 462]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.1ms | ActiveRecord: 1.9ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.8ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 164) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 164) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 164], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 463]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 463]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 463], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/463/payments/new" for 127.0.0.1 at 2015-04-13 20:18:05 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"463"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "463"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 164]] Adherent::Adhesion Load (0.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 463]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.8ms | ActiveRecord: 1.6ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 463]] Started POST "/adherent/members/463/payments" for 127.0.0.1 at 2015-04-13 20:18:05 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"463"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "463"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 463]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 164]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 463], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 463]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/463/payments Completed 302 Found in 12ms (ActiveRecord: 3.5ms) Started GET "/adherent/members/463/payments" for 127.0.0.1 at 2015-04-13 20:18:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"463"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "463"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 463]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 280]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 280]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 280]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 280]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 280]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 463]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 18.3ms | ActiveRecord: 4.9ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 463]] SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 165) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 165) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 165], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 464]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 464]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 464], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/464/payments/new" for 127.0.0.1 at 2015-04-13 20:18:05 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"464"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "464"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 165]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 464]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.4ms | ActiveRecord: 1.8ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 166) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 166) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 166], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 465]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 465]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 465], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/465/payments/new" for 127.0.0.1 at 2015-04-13 20:18:05 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"465"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "465"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 166]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 465]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.3ms | ActiveRecord: 1.8ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 167) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 167) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 167], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 466]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 466]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 466], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 466]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 167]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 466], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 466]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/466/payments" for 127.0.0.1 at 2015-04-13 20:18:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"466"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "466"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 466]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 281]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 281]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 281]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 281]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 281]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 466]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 9.8ms | ActiveRecord: 3.7ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 168) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 168) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 168], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 467]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 467]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 467], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 467]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 168]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 467], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:05 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 467]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/467/payments" for 127.0.0.1 at 2015-04-13 20:18:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"467"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "467"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 467]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 282]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 282]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 282]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 282]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 282]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 467]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 9.5ms | ActiveRecord: 3.6ms) Started GET "/adherent/payments/282/reglements/new" for 127.0.0.1 at 2015-04-13 20:18:05 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"282"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "282"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 467]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 282]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 282]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 282]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 282]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 16.4ms | ActiveRecord: 3.6ms) SQL (1.1ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 169) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 169) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 169], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 468]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 468]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 468], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 468]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 169]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 468], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 468]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/468/payments/283" for 127.0.0.1 at 2015-04-13 20:18:06 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"468", "id"=>"283"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "468"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 283 LIMIT 1 [["member_id", 468]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 283]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 283]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 468]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 283]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 283]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 283]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 23.5ms | ActiveRecord: 4.3ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 170) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 170) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 170], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 469]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 469]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 469], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 469]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 170]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 469], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]] Adherent::Adhesion Load (0.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 469]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/469/payments/284" for 127.0.0.1 at 2015-04-13 20:18:06 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"469", "id"=>"284"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "469"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 284 LIMIT 1 [["member_id", 469]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 284]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 284]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 469]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 284]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 284]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 284]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.4ms | ActiveRecord: 3.3ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 171) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 171) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 171], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 470]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 470]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 470], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 470]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 171]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 470], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 470]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/470/payments/285" for 127.0.0.1 at 2015-04-13 20:18:06 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"470", "id"=>"285"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "470"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 285 LIMIT 1 [["member_id", 470]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 285]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 285]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 470]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 285]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 285]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 285]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.4ms | ActiveRecord: 4.0ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 172) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 172) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 172], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 471], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 471]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 471]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["from_date", Thu, 14 May 2015], ["member_id", 471], ["to_date", Fri, 13 May 2016], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 471]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 172]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 471], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 471]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 542]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 542], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["payment_id", 286], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 543]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 543], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["payment_id", 286], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.2ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 173) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 173) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 173], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 472], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 472]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 472]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["from_date", Thu, 14 May 2015], ["member_id", 472], ["to_date", Fri, 13 May 2016], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 472]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 173]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 472], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 472]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 544]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 544], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["payment_id", 287], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 545]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 545], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["payment_id", 287], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 287]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 287]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 174) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 174) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 174], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 473], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 473]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 473]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["from_date", Thu, 14 May 2015], ["member_id", 473], ["to_date", Fri, 13 May 2016], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 473]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 174]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 175) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 175) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 175], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 474], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 474]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 474]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["from_date", Thu, 14 May 2015], ["member_id", 474], ["to_date", Fri, 13 May 2016], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 474]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 175]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 474], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 474]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 548]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 548], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["payment_id", 288], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 176) LIMIT 1  (1.0ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 176) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 176], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 475], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 475]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 475]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["from_date", Thu, 14 May 2015], ["member_id", 475], ["to_date", Fri, 13 May 2016], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 475]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 176]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x63c3f38 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.0ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x639acdc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x636977c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x63453ae @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6311de2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6311de2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x62f6af6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x62d6b34 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x62d6b34%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 4ms (ActiveRecord: 1.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x62b1bd6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6298992 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x627f1c2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x627f1c2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x625bac4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 188) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 188], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/476/coord/new Completed 302 Found in 12ms (ActiveRecord: 3.9ms)  (0.1ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 189) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 189], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/477/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 3.2ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 191) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 191], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/478/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.2ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 194]] Sent data Mon association-13-avr-2015-Membres.csv (2.2ms) Completed 200 OK in 9ms (Views: 1.9ms | ActiveRecord: 2.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as XLS Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 196]] Sent data Mon association-13-avr-2015-Membres.xls (0.4ms) Completed 200 OK in 8ms (Views: 0.2ms | ActiveRecord: 2.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5cfb85e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 4ms (ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5ce0478 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 4ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"479"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/479 Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (3.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"480"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.7ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"481"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 481 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 481 [["name", "Dalton"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/481 Completed 302 Found in 10ms (ActiveRecord: 3.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"482"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/482 Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.7ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x503b4a2 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x4edbd32 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.6ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x4df3262 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x4df330c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK SQL (1.0ms) DELETE FROM "adherent_members" Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.7ms) BEGIN SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (2.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 210) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 210) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 210], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 210) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 210) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 210], ["updated_at", Mon, 13 Apr 2015 18:18:06 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 210) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 210) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 210], ["updated_at", Mon, 13 Apr 2015 18:18:07 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 210) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 210) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 210], ["updated_at", Mon, 13 Apr 2015 18:18:07 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 210) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 210) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 210], ["updated_at", Mon, 13 Apr 2015 18:18:07 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:18:10 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (3.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 210]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 50ms (Views: 36.2ms | ActiveRecord: 10.5ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-04-13 20:18:11 +0200 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-04-13 20:18:11 +0200 Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-04-13 20:18:13 +0200 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-04-13 20:18:13 +0200 Started GET "/assets/adherent/icones/csv.png" for 127.0.0.1 at 2015-04-13 20:18:13 +0200 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-04-13 20:18:13 +0200 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-04-13 20:18:13 +0200 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-04-13 20:18:13 +0200 Started GET "/assets/adherent/icones/xls.png" for 127.0.0.1 at 2015-04-13 20:18:13 +0200 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-04-13 20:18:13 +0200 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-04-13 20:18:13 +0200 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-04-13 20:18:13 +0200 Started GET "/assets/back_disabled.png" for 127.0.0.1 at 2015-04-13 20:18:13 +0200 Started GET "/assets/forward_disabled.png" for 127.0.0.1 at 2015-04-13 20:18:13 +0200 Started GET "/adherent/members/delete_member_483?data%5Bconfirm%5D=Etes+vous+s%C3%BBr+%3F&method=delete" for 127.0.0.1 at 2015-04-13 20:18:14 +0200 Processing by Adherent::MembersController#show as HTML Parameters: {"data"=>{"confirm"=>"Etes vous sûr ?"}, "method"=>"delete", "id"=>"delete_member_483"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "delete_member_483"]] Completed 404 Not Found in 10ms  (2.1ms) ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL  (42.7ms) select table_name from information_schema.views where table_schema = 'adh_test'  (82.3ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (1.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:17 UTC +00:00]]  (115.8ms) COMMIT Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.8ms) BEGIN Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:17 UTC +00:00]]  (4.1ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.6ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:17 UTC +00:00]]  (3.1ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:17 UTC +00:00]]  (2.2ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:17 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:17 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) BEGIN Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:17 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Mon, 13 Apr 2015 18:18:17 UTC +00:00]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (2.2ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-04-13 20:18:17 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 1]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 13.6ms | ActiveRecord: 9.6ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-04-13 20:18:17 +0200 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-04-13 20:18:17 +0200 Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-04-13 20:18:17 +0200 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-04-13 20:18:17 +0200 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-04-13 20:18:17 +0200 Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-04-13 20:18:18 +0200 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] SQL (0.5ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (120.8ms) COMMIT Redirected to http://127.0.0.1:53541/adherent/members/1/payments Completed 302 Found in 134ms (ActiveRecord: 126.3ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2015-04-13 20:18:18 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 4.4ms | ActiveRecord: 8.9ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-04-13 20:18:18 +0200 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-04-13 20:18:18 +0200 Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-04-13 20:18:18 +0200  (2.6ms) SELECT COUNT(*) FROM "adherent_payments"  (0.9ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (4.9ms) select table_name from information_schema.views where table_schema = 'adh_test'  (100.4ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:19 UTC +00:00]]  (113.8ms) COMMIT Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (1.0ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:19 UTC +00:00]]  (2.3ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:19 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:19 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:19 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:19 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.3ms) BEGIN SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:19 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 1], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:19 UTC +00:00]]  (1.3ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-04-13 20:18:19 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (1.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 8.8ms | ActiveRecord: 4.3ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-04-13 20:18:19 +0200 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-04-13 20:18:19 +0200 Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2015-04-13 20:18:20 +0200 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (3.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (120.7ms) COMMIT Redirected to http://127.0.0.1:53541/adherent/members/1/adhesions Completed 302 Found in 144ms (ActiveRecord: 126.8ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-04-13 20:18:20 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:53541/adherent/members/1/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.4ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2015-04-13 20:18:20 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.0ms | ActiveRecord: 3.9ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-04-13 20:18:20 +0200 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-04-13 20:18:20 +0200 Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-04-13 20:18:21 +0200  (2.2ms) SELECT COUNT(*) FROM "adherent_adhesions"  (2.1ms) ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (6.3ms) select table_name from information_schema.views where table_schema = 'adh_test'  (123.8ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.6ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:21 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Mon, 13 Apr 2015 18:18:21 UTC +00:00], ["member_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:21 UTC +00:00], ["zip", 59000]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 1]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] SQL (0.5ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64f963c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:21 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.3ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64ba11c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.6ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64731b8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x64731b8%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64103ce @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x63b9196 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x6363dc2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6363dc2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x631055a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x62e123c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x62e123c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x62a8b76 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6283d1c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"13/04/2016", "from_date"=>"13/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x625bcc2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x625bcc2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"13/04/2016", "from_date"=>"13/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ec5c3e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.2ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"13/04/2016", "from_date"=>"13/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e501d2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5e501d2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 14], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 14], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 2]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 2]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 2], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 2]] Started GET "/adherent/members/2/payments/new" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"2"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 13.8ms | ActiveRecord: 4.7ms) Started POST "/adherent/members/2/payments" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"2"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 2]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 14]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 2], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 1], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["payment_id", 1], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/2/payments Completed 302 Found in 19ms (ActiveRecord: 6.3ms) Started GET "/adherent/members/2/payments" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"2"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 2]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 2]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.8ms | ActiveRecord: 6.3ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 2]]  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 15], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 15], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 5]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 5], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/5/payments/new" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"5"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]] Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 13.1ms | ActiveRecord: 4.4ms) Started POST "/adherent/members/5/payments" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"5"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 15]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 5], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 2], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["payment_id", 2], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/5/payments Completed 302 Found in 19ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/5/payments" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"5"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 5]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 2]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.7ms | ActiveRecord: 4.9ms)  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 16], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 16], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 16], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 8]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 8]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 8], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/8/payments/new" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"8"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.0ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/8/payments" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"8"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 16]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 8], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] SQL (1.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 3], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["payment_id", 3], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/8/payments Completed 302 Found in 19ms (ActiveRecord: 6.4ms) Started GET "/adherent/members/8/payments" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"8"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 8]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 3]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.9ms | ActiveRecord: 5.1ms)  (1.3ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 17], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 17], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 17], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 11]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 11], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/11/payments/new" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"11"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.9ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/11/payments" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"11"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 17]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 11], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 4], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["payment_id", 4], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/11/payments Completed 302 Found in 18ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/11/payments" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"11"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 11]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 4]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.8ms | ActiveRecord: 4.1ms)  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 18], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 18], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 14]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 14]]  (1.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 14], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/14/payments/new" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"14"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Adhesion Load (2.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 14.3ms | ActiveRecord: 5.7ms) Started POST "/adherent/members/14/payments" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"14"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 18]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 14], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 5], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["payment_id", 5], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/14/payments Completed 302 Found in 18ms (ActiveRecord: 5.7ms) Started GET "/adherent/members/14/payments" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"14"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 14]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 5]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.6ms | ActiveRecord: 6.1ms) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 19], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 19], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 17]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 17]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 17], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/17/payments/new" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"17"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.2ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/17/payments" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"17"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 19]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 17], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 6], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["payment_id", 6], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/17/payments Completed 302 Found in 18ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/17/payments" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"17"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 17]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 6]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 21.5ms | ActiveRecord: 4.7ms)  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 20], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 20], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 20]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 20]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 20], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/20/payments/new" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"20"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "20"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 20]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 13.8ms | ActiveRecord: 3.9ms) Started POST "/adherent/members/20/payments" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"20"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "20"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 20]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 20], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 20]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 7], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["payment_id", 7], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/20/payments Completed 302 Found in 17ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/20/payments" for 127.0.0.1 at 2015-04-13 20:18:22 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"20"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "20"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 20]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.8ms | ActiveRecord: 4.1ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 20]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 21], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 21], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 23]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 23]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 23], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/23/payments/new" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"23"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 21]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 23]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.2ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/23/payments" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"23"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 21]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 23], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 23]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 8], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["payment_id", 8], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/23/payments Completed 302 Found in 19ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/23/payments" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"23"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "23"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 23]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 8]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.9ms | ActiveRecord: 4.7ms) Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 23]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 24]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 24]]  (1.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 24], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 25]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 25]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 25], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/8/reglements/new" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"8"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 18.7ms | ActiveRecord: 5.5ms) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 23]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 23]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 22], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 22], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 26]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 26]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 26], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/26/payments/new" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"26"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.6ms | ActiveRecord: 2.0ms) Started POST "/adherent/members/26/payments" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"26"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 26], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 11], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["payment_id", 9], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/26/payments Completed 302 Found in 17ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/26/payments" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"26"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 26]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 11]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.4ms | ActiveRecord: 4.4ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 26]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 27]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 27]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 27], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 28]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 28]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 28], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/9/reglements/new" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"9"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 28]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 17.5ms | ActiveRecord: 5.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 23], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 23], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 29]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 29]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 29], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/29/payments/new" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"29"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 29]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 23ms (Views: 14.1ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/29/payments" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"29"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 23]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 29], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 29]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 14], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["payment_id", 10], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/29/payments Completed 302 Found in 18ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/29/payments" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"29"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "29"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 29]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.2ms | ActiveRecord: 4.9ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 29]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 30]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 30]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 30], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 31]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 31]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 31], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/10/reglements/new" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"10"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 31]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 30]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 17.5ms | ActiveRecord: 5.9ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 24], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 24], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 32]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 32]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 32], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/32/payments/new" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"32"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 24]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 32]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.5ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/32/payments" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"32"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 24]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 32], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 32]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 17], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["payment_id", 11], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/32/payments Completed 302 Found in 17ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/32/payments" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"32"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 32]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.7ms | ActiveRecord: 4.0ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 32]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 33]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 33]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 33], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 34]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 34]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 34], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/11/reglements/new" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"11"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.8ms | ActiveRecord: 5.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 25], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 25], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 35]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 35]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 35], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/35/payments/new" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"35"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 35]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.0ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/35/payments" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"35"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 25]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 35], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 35]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 20], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["payment_id", 12], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/35/payments Completed 302 Found in 18ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/35/payments" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"35"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 35]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.4ms | ActiveRecord: 3.9ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 35]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 36]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 36]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 36], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 37]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 37]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 37], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/12/reglements/new" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"12"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 17.0ms | ActiveRecord: 5.3ms) Started POST "/adherent/payments/12/reglements" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"21"}, "commit"=>"Enregistrer", "payment_id"=>"12"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "21"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 21], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["payment_id", 12], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Redirected to http://www.example.com/adherent/members/35/payments Completed 302 Found in 13ms (ActiveRecord: 4.2ms) Started GET "/adherent/members/35/payments" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"35"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 35]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 21]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.6ms | ActiveRecord: 5.0ms)  (0.6ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 26], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 26], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 38]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 38]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 38], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/38/payments/new" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"38"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]] Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 38]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.7ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/38/payments" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"38"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 26]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 38], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 38]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 23], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["payment_id", 13], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/38/payments Completed 302 Found in 21ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/38/payments" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"38"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 38]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 16.0ms | ActiveRecord: 5.8ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 38]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 39]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 39]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 39], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 40]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 40]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 40], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/13/reglements/new" for 127.0.0.1 at 2015-04-13 20:18:23 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"13"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 40]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 39]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.7ms | ActiveRecord: 4.9ms) Started POST "/adherent/payments/13/reglements" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"24"}, "commit"=>"Enregistrer", "payment_id"=>"13"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "24"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 24], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["payment_id", 13], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Redirected to http://www.example.com/adherent/members/38/payments Completed 302 Found in 12ms (ActiveRecord: 3.8ms) Started GET "/adherent/members/38/payments" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"38"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 38]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 24]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 39]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.7ms | ActiveRecord: 4.6ms) Adherent::Reglement Load (1.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]]  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 27], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 27], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 27], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 41]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 41]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 41], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/41/payments/new" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"41"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 41]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.0ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/41/payments" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"41"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 27]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 41], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 41]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 26], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["payment_id", 14], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/41/payments Completed 302 Found in 17ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/41/payments" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"41"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 41]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 17.8ms | ActiveRecord: 4.6ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 41]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 42]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 42]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 42], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 43]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 43]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 43], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/14/reglements/new" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"14"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 43]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 42]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 17.2ms | ActiveRecord: 5.0ms) Started POST "/adherent/payments/14/reglements" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"27"}, "commit"=>"Enregistrer", "payment_id"=>"14"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "27"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 27], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["payment_id", 14], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Redirected to http://www.example.com/adherent/members/41/payments Completed 302 Found in 13ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/41/payments" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"41"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 41]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 42]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 16.7ms | ActiveRecord: 5.7ms) Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 42]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 28], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 28], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 44]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 44]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 44], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/44/payments/new" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"44"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "44"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.8ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/44/payments" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"44"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "44"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 44]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 28]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 44], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 29], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["payment_id", 15], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/44/payments Completed 302 Found in 16ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/44/payments" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"44"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "44"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 44]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 44]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 44]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.5ms | ActiveRecord: 4.6ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 44]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 45]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 45]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 45], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 46]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 46]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 46], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/15/reglements/new" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"15"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 44]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 45]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 46]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 18.1ms | ActiveRecord: 5.6ms) Started POST "/adherent/payments/15/reglements" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"30"}, "commit"=>"Enregistrer", "payment_id"=>"15"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "30"]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 30], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["payment_id", 15], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 44]] Redirected to http://www.example.com/adherent/members/44/payments Completed 302 Found in 20ms (ActiveRecord: 4.2ms) Started GET "/adherent/members/44/payments" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"44"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "44"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 44]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 44]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 45]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 44]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.9ms | ActiveRecord: 5.2ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (1.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 29], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 29], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 47]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 47]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 47], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/47/payments/new" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"47"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 47]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.8ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/47/payments" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"47"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]]  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 47]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 47], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 47]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 32], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["payment_id", 16], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/47/payments Completed 302 Found in 17ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/47/payments" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"47"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 47]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 47]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 47]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.0ms | ActiveRecord: 4.3ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 47]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 48]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 48]]  (0.7ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 48], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 49]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 49]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 49], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/16/reglements/new" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"16"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 47]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 48]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 49]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 17.1ms | ActiveRecord: 5.2ms) Started POST "/adherent/payments/16/reglements" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"33"}, "commit"=>"Enregistrer", "payment_id"=>"16"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "33"]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 33], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["payment_id", 16], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 47]] Redirected to http://www.example.com/adherent/members/47/payments Completed 302 Found in 13ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/47/payments" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"47"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 47]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 47]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 48]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 47]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.7ms | ActiveRecord: 5.7ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 48]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 30], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 30], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 30], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 30], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 30]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 16.5ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 31], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 31], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 31], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 31], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 15.6ms | ActiveRecord: 3.5ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 32], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 32], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 32], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 32], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 32], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 15.6ms | ActiveRecord: 2.6ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/60/payments" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"60"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "60"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 60]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 7ms (Views: 3.9ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 33], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 33], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 33], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 33], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 33]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 19.1ms | ActiveRecord: 3.9ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/65/adhesions" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"65"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "65"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 65]] Redirected to http://www.example.com/adherent/members/65/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.6ms) Started GET "/adherent/members/65/adhesions/new" for 127.0.0.1 at 2015-04-13 20:18:24 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"65"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "65"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 65]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 65]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.8ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 34], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 34], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 34], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 34], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:18:25 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 17.7ms | ActiveRecord: 3.6ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/70/coord" for 127.0.0.1 at 2015-04-13 20:18:25 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"70"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 70]] Redirected to http://www.example.com/adherent/members/70/coord/new Completed 302 Found in 7ms (ActiveRecord: 2.7ms) Started GET "/adherent/members/70/coord/new" for 127.0.0.1 at 2015-04-13 20:18:25 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"70"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 70]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 21.4ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 35], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 35], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 35], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 35], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 35], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:18:25 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 15.2ms | ActiveRecord: 1.9ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2015-04-13 20:18:25 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 15.6ms | ActiveRecord: 0.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 36], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 36], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 36], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 36], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 36], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:18:25 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 36]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 15.9ms | ActiveRecord: 1.8ms) Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/80/edit" for 127.0.0.1 at 2015-04-13 20:18:25 +0200 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"80"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "80"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 15.2ms | ActiveRecord: 1.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 37], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 37], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 37], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 37], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 37], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:18:25 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 16.5ms | ActiveRecord: 2.0ms) Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["member_id", 85], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 85]] Started GET "/adherent/members/85/coord" for 127.0.0.1 at 2015-04-13 20:18:25 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"85"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "85"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 85]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 9ms (Views: 4.9ms | ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 38], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 38], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 38], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 38], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 38], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:18:25 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 17.3ms | ActiveRecord: 1.6ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 90]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 90]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 90], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/90/adhesions" for 127.0.0.1 at 2015-04-13 20:18:25 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"90"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "90"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 90]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 90]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 16.4ms | ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 39], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 39], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 39], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 39], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 39], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2015-04-13 20:18:25 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 12.7ms | ActiveRecord: 0.5ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2015-04-13 20:18:25 +0200 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 39], ["updated_at", Mon, 13 Apr 2015 18:18:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/100/coord/new Completed 302 Found in 8ms (ActiveRecord: 2.0ms) Started GET "/adherent/members/100/coord/new" for 127.0.0.1 at 2015-04-13 20:18:25 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"100"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "100"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 100]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (21.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 24.8ms | ActiveRecord: 1.4ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (5.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/show.html.erb within layouts/adherent/application (0.3ms) Completed 200 OK in 40ms (Views: 7.8ms | ActiveRecord: 14.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:01 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 19ms (Views: 0.9ms | ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as XLS Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 44]] Sent data Mon association-13-avr-2015-Membres.xls (1.3ms) Completed 200 OK in 24ms (Views: 1.2ms | ActiveRecord: 3.8ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 45]] Sent data Mon association-13-avr-2015-Membres.csv (0.4ms) Completed 200 OK in 7ms (Views: 0.2ms | ActiveRecord: 2.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"101"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 101 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 101 [["name", "Dalton"], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/101 Completed 302 Found in 12ms (ActiveRecord: 3.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"102"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/102 Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"103"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/103 Completed 302 Found in 5ms (ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"104"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.4ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 53], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/105/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.2ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 54], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/106/coord/new Completed 302 Found in 9ms (ActiveRecord: 3.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 55], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/107/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.3ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5ed9cb6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5ee6240 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 4ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 59], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 59], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 59], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 59], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 59], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (2.2ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 108]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 108]]  (0.4ms) BEGIN SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 108], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:02 UTC +00:00]]  (1.7ms) COMMIT Started GET "/adherent/members/108/adhesions" for 127.0.0.1 at 2015-04-13 20:20:06 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"108"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]] Adherent::Adhesion Exists (0.9ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 108]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 108]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (2.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (32.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.2ms) Completed 200 OK in 106ms (Views: 81.4ms | ActiveRecord: 16.8ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-04-13 20:20:06 +0200 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-04-13 20:20:06 +0200 Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-04-13 20:20:06 +0200 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-04-13 20:20:06 +0200 Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-04-13 20:20:06 +0200 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-04-13 20:20:06 +0200 Started DELETE "/adherent/members/108/adhesions/36" for 127.0.0.1 at 2015-04-13 20:20:07 +0200 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"108", "id"=>"36"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]] Adherent::Adhesion Load (2.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 108], ["id", "36"]]  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 36]]  (44.3ms) COMMIT Redirected to http://127.0.0.1:34148/adherent/members/108/adhesions Completed 302 Found in 58ms (ActiveRecord: 50.7ms) Started GET "/adherent/members/108/adhesions" for 127.0.0.1 at 2015-04-13 20:20:07 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"108"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 108]] Redirected to http://127.0.0.1:34148/adherent/members/108/adhesions/new Completed 302 Found in 15ms (ActiveRecord: 9.6ms) Started GET "/adherent/members/108/adhesions/new" for 127.0.0.1 at 2015-04-13 20:20:07 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"108"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 108]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 108]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (42.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 55ms (Views: 48.0ms | ActiveRecord: 2.5ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-04-13 20:20:07 +0200  (2.3ms) SELECT COUNT(*) FROM "adherent_adhesions"  (1.2ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (3.2ms) select table_name from information_schema.views where table_schema = 'adh_test'  (126.2ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.9ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:08 UTC +00:00]]  (121.1ms) COMMIT Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:08 UTC +00:00]]  (2.5ms) COMMIT Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:08 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:08 UTC +00:00]]  (1.0ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:08 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:08 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:20:08 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (3.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 52ms (Views: 43.9ms | ActiveRecord: 6.4ms) Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-04-13 20:20:08 +0200 Started GET "/assets/adherent/icones/csv.png" for 127.0.0.1 at 2015-04-13 20:20:08 +0200 Started GET "/assets/adherent/icones/xls.png" for 127.0.0.1 at 2015-04-13 20:20:08 +0200 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-04-13 20:20:08 +0200 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-04-13 20:20:08 +0200 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-04-13 20:20:09 +0200 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-04-13 20:20:09 +0200 Started GET "/assets/forward_disabled.png" for 127.0.0.1 at 2015-04-13 20:20:09 +0200 Started GET "/assets/back_disabled.png" for 127.0.0.1 at 2015-04-13 20:20:09 +0200 Started GET "/adherent/members/delete_member_1?data%5Bconfirm%5D=Etes+vous+s%C3%BBr+%3F&method=delete" for 127.0.0.1 at 2015-04-13 20:20:09 +0200 Processing by Adherent::MembersController#show as HTML Parameters: {"data"=>{"confirm"=>"Etes vous sûr ?"}, "method"=>"delete", "id"=>"delete_member_1"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "delete_member_1"]] Completed 404 Not Found in 4ms  (1.9ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (2.3ms) select table_name from information_schema.views where table_schema = 'adh_test'  (90.1ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_reglements", "organisms", "adherent_payments" RESTART IDENTITY CASCADE;  (0.6ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL SQL (1.0ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:12 UTC +00:00]]  (131.4ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:12 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:12 UTC +00:00]]  (2.1ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:12 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:12 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:12 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Load (2.2ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.6ms) BEGIN Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:12 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Mon, 13 Apr 2015 18:20:12 UTC +00:00]] Adherent::Adhesion Load (2.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (1.6ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-04-13 20:20:12 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 1]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (17.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 58ms (Views: 42.6ms | ActiveRecord: 9.3ms) Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-04-13 20:20:12 +0200 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-04-13 20:20:12 +0200 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-04-13 20:20:12 +0200 Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-04-13 20:20:13 +0200 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (3.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.1ms) BEGIN Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] SQL (1.0ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (126.4ms) COMMIT Redirected to http://127.0.0.1:34148/adherent/members/1/payments Completed 302 Found in 149ms (ActiveRecord: 132.5ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2015-04-13 20:20:13 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 10.6ms | ActiveRecord: 4.8ms)  (1.6ms) SELECT COUNT(*) FROM "adherent_payments"  (0.6ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (1.8ms) select table_name from information_schema.views where table_schema = 'adh_test'  (90.3ms) TRUNCATE TABLE "adherent_coords", "adherent_members", "adherent_adhesions", "organisms", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (0.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.9ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 1], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 2]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 2]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 2], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (4.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 2]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 2]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 3]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 3]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 3], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 3]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 3]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ae2c20 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 2.7ms | ActiveRecord: 2.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5a72e48 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.1ms)  (0.8ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5a03d54 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x59a4d9a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x5993c3e @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"13/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x59379c0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x59379c0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 7ms (ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"13/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x58d76ce @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x58d76ce%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 7ms (ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"13/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x58913c2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 8], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 8], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 8], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 7]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 7]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 7], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/7/payments/new" for 127.0.0.1 at 2015-04-13 20:20:14 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"7"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "7"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 8]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (18.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 37ms (Views: 24.3ms | ActiveRecord: 5.0ms) Started POST "/adherent/members/7/payments" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"7"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "7"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 8]] SQL (3.5ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 7], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] SQL (1.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 4], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["payment_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/7/payments Completed 302 Found in 31ms (ActiveRecord: 9.9ms) Started GET "/adherent/members/7/payments" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"7"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 7]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 4]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (22.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.4ms) Completed 200 OK in 34ms (Views: 25.0ms | ActiveRecord: 6.1ms) Adherent::Payment Load (1.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 7]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 9], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 9], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 9], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 10]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 10]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 10], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/10/payments/new" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"10"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "10"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 9]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 10]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 15.6ms | ActiveRecord: 4.9ms) Started POST "/adherent/members/10/payments" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"10"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "10"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 10]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 9]] SQL (1.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 10], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 10]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 5], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["payment_id", 2], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/10/payments Completed 302 Found in 19ms (ActiveRecord: 6.6ms) Started GET "/adherent/members/10/payments" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"10"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 10]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 5]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 10]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.8ms | ActiveRecord: 4.9ms)  (1.4ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 10]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 10], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 10], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 10], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 13]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 13]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 13], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/13/payments/new" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"13"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 10]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 13]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 13.8ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/13/payments" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"13"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 10]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 13], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 13]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 6], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["payment_id", 3], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/13/payments Completed 302 Found in 20ms (ActiveRecord: 5.6ms) Started GET "/adherent/members/13/payments" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"13"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 13]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 6]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.7ms | ActiveRecord: 5.2ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 11], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 11], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 11], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 16]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 16]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 16], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 16]] Started GET "/adherent/members/16/payments/new" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"16"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 11]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 16]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 14.1ms | ActiveRecord: 6.3ms) Started POST "/adherent/members/16/payments" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"16"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 11]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 16], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 16]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 7], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["payment_id", 4], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/16/payments Completed 302 Found in 18ms (ActiveRecord: 5.7ms) Started GET "/adherent/members/16/payments" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"16"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 16]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.2ms | ActiveRecord: 5.5ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 16]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 12], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 12], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 12], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 19]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 19]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 19], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/19/payments/new" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"19"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "19"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 12]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 19]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.3ms) Completed 200 OK in 21ms (Views: 12.4ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/19/payments" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"19"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "19"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 12]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 19], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 19]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 8], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["payment_id", 5], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/19/payments Completed 302 Found in 16ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/19/payments" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"19"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "19"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 19]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 8]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.2ms | ActiveRecord: 4.1ms)  (1.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 19]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 13], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 13], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 13], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 22]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 22]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 22], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/22/payments/new" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"22"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "22"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 22]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.7ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/22/payments" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"22"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "22"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 13]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 22], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 22]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 9], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["payment_id", 6], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/22/payments Completed 302 Found in 18ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/22/payments" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"22"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "22"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 22]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 9]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (21.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 25.0ms | ActiveRecord: 5.4ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 22]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 23]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 23]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 23], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 24]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 24]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 24], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/6/reglements/new" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"6"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "6"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (17.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 21.8ms | ActiveRecord: 6.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 14], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 14], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 25]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 25]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 25], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/25/payments/new" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"25"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "25"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 25]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.0ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/25/payments" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"25"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "25"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 14]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 25], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 25]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 12], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["payment_id", 7], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/25/payments Completed 302 Found in 17ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/25/payments" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"25"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "25"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 25]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 12]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.3ms | ActiveRecord: 4.4ms) Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 25]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 26]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 26]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 26], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 27]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 27]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 27], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/7/reglements/new" for 127.0.0.1 at 2015-04-13 20:20:15 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"7"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 28ms (Views: 17.0ms | ActiveRecord: 5.9ms) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 25]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 25]] Adherent::Reglement Load (2.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 15], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 15], ["updated_at", Mon, 13 Apr 2015 18:20:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 28]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 28]]  (0.3ms) SAVEPOINT active_record_1 SQL (2.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 28], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/28/payments/new" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"28"} Organism Load (2.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "28"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 28]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 15.6ms | ActiveRecord: 4.6ms) Started POST "/adherent/members/28/payments" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"28"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "28"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 28]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 15]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 28], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 28]]  (1.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 15], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["payment_id", 8], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/28/payments Completed 302 Found in 24ms (ActiveRecord: 7.0ms) Started GET "/adherent/members/28/payments" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"28"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "28"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 28]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 28]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.7ms | ActiveRecord: 4.4ms) Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 28]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 29]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 29]]  (1.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 29], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 30]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 30]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 30], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/8/reglements/new" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"8"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 30]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (18.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 20.7ms | ActiveRecord: 6.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 16], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 16], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 16], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 31]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 31]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 31], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/31/payments/new" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"31"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 31]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.6ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/31/payments" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"31"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 31]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 16]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 31], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 31]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 18], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["payment_id", 9], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/31/payments Completed 302 Found in 19ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/31/payments" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"31"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 31]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 18.7ms | ActiveRecord: 4.7ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 31]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 32]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 32]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 32], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 33]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 33]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 33], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/9/reglements/new" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"9"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 18.8ms | ActiveRecord: 5.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 17], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (7.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 17], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 17], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 34]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 34]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 34], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/34/payments/new" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"34"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "34"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 34]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 12.9ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/34/payments" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"34"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "34"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 17]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 34], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 34]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 21], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["payment_id", 10], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/34/payments Completed 302 Found in 19ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/34/payments" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"34"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "34"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 34]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 21]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.8ms | ActiveRecord: 4.4ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 34]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 35]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 35]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 35], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 36]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 36]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 36], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/10/reglements/new" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"10"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 16.1ms | ActiveRecord: 6.3ms) Started POST "/adherent/payments/10/reglements" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"22"}, "commit"=>"Enregistrer", "payment_id"=>"10"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "22"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 22], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["payment_id", 10], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]] Redirected to http://www.example.com/adherent/members/34/payments Completed 302 Found in 12ms (ActiveRecord: 4.2ms) Started GET "/adherent/members/34/payments" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"34"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "34"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 34]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 21]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (1.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (19.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 17.8ms | ActiveRecord: 7.7ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 18], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 18], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 37]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 37]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 37], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/37/payments/new" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"37"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "37"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 37]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.2ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/37/payments" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"37"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "37"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 18]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 37], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 37]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 24], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["payment_id", 11], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/37/payments Completed 302 Found in 17ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/37/payments" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"37"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "37"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 37]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 24]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.0ms | ActiveRecord: 4.2ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 37]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 38]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 38]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 38], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 39]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 39]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 39], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/11/reglements/new" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"11"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 39]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 18.3ms | ActiveRecord: 6.0ms) Started POST "/adherent/payments/11/reglements" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"25"}, "commit"=>"Enregistrer", "payment_id"=>"11"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "25"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 25], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["payment_id", 11], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]] Redirected to http://www.example.com/adherent/members/37/payments Completed 302 Found in 14ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/37/payments" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"37"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "37"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 37]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 24]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 16.1ms | ActiveRecord: 4.6ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 38]]  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 19], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 19], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 40]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 40]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 40], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/40/payments/new" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"40"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "40"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 40]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.2ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/40/payments" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"40"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "40"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 40]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 19]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 40], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 40]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 27], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["payment_id", 12], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/40/payments Completed 302 Found in 18ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/40/payments" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"40"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "40"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 40]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 40]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 40]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.0ms | ActiveRecord: 4.1ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 40]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 41]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 41]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 41], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 42]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 42]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 42], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/12/reglements/new" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"12"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 40]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 42]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 17.3ms | ActiveRecord: 5.9ms) Started POST "/adherent/payments/12/reglements" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"28"}, "commit"=>"Enregistrer", "payment_id"=>"12"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "28"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 28], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["payment_id", 12], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 40]] Redirected to http://www.example.com/adherent/members/40/payments Completed 302 Found in 16ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/40/payments" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"40"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "40"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 40]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 40]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 41]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 40]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.0ms | ActiveRecord: 5.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 20], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 20], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 43]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 43]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 43], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/43/payments/new" for 127.0.0.1 at 2015-04-13 20:20:16 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"43"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "43"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 43]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.7ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/43/payments" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"43"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "43"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 43]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 20]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 43], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 43]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 30], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["payment_id", 13], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/43/payments Completed 302 Found in 17ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/43/payments" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"43"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "43"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 43]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 43]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 43]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.7ms | ActiveRecord: 4.8ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 43]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 44]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 44]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 44], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 45]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 45]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 45], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/13/reglements/new" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"13"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 43]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 44]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 45]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 25.2ms | ActiveRecord: 5.3ms) Started POST "/adherent/payments/13/reglements" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"31"}, "commit"=>"Enregistrer", "payment_id"=>"13"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "31"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 31], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["payment_id", 13], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 43]] Redirected to http://www.example.com/adherent/members/43/payments Completed 302 Found in 13ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/43/payments" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"43"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "43"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 43]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 43]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 44]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 43]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 16.0ms | ActiveRecord: 4.9ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 44]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 21], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 21], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 46]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 46]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 46], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/46/payments/new" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"46"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "46"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 21]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 46]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.4ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/46/payments" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"46"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "46"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 46]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 21]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 46], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 46]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 33], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["payment_id", 14], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/46/payments Completed 302 Found in 17ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/46/payments" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"46"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "46"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 46]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 46]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 46]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.1ms | ActiveRecord: 4.1ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 46]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 47]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 47]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 47], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 48]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 48]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 48], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/14/reglements/new" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"14"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 46]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 47]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 48]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.5ms | ActiveRecord: 5.8ms) Started POST "/adherent/payments/14/reglements" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"34"}, "commit"=>"Enregistrer", "payment_id"=>"14"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "34"]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 34], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["payment_id", 14], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 46]] Redirected to http://www.example.com/adherent/members/46/payments Completed 302 Found in 12ms (ActiveRecord: 4.0ms) Started GET "/adherent/members/46/payments" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"46"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "46"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 46]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 46]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 47]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 46]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 16.0ms | ActiveRecord: 5.4ms) Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 46]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 22], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 22], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 49]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 49]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 49], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/49/payments/new" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"49"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "49"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 49]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.5ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/49/payments" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"49"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "49"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 49]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 49], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 49]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 36], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["payment_id", 15], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/49/payments Completed 302 Found in 17ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/49/payments" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"49"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "49"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 49]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 49]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 49]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.6ms | ActiveRecord: 4.0ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 49]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 23], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 23], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 52]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 52]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 52], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/52/payments/new" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"52"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "52"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 52]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.4ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/52/payments" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"52"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "52"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 52]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 23]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 52], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 52]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 37], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["payment_id", 16], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/52/payments Completed 302 Found in 19ms (ActiveRecord: 6.6ms) Started GET "/adherent/members/52/payments" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"52"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "52"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 52]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 37]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 52]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 52]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.2ms | ActiveRecord: 4.0ms)  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 52]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 24], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 24], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 24], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 24], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 24]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 16.0ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 25], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 25], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 25], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 25], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 16.9ms | ActiveRecord: 4.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 26], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 26], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 26], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 26], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 21ms (Views: 17.8ms | ActiveRecord: 0.5ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 26], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/70/coord/new Completed 302 Found in 9ms (ActiveRecord: 2.6ms) Started GET "/adherent/members/70/coord/new" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"70"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]] Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 70]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (30.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 58ms (Views: 35.8ms | ActiveRecord: 4.5ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 27], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 27], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 27], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 27], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 27], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 15.5ms | ActiveRecord: 3.3ms) Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["member_id", 71], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 71]] Started GET "/adherent/members/71/coord" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"71"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 71]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 10ms (Views: 5.7ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 28], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 28], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 28], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 28], ["updated_at", Mon, 13 Apr 2015 18:20:17 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:20:17 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 28]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 16.3ms | ActiveRecord: 2.0ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/76/coord" for 127.0.0.1 at 2015-04-13 20:20:18 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"76"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "76"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 76]] Redirected to http://www.example.com/adherent/members/76/coord/new Completed 302 Found in 7ms (ActiveRecord: 2.6ms) Started GET "/adherent/members/76/coord/new" for 127.0.0.1 at 2015-04-13 20:20:18 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"76"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "76"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 76]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 21.4ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.5ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 29], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 29], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 29], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 29], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:20:18 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 16.9ms | ActiveRecord: 2.3ms) Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 81]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 81]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 81], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/81/adhesions" for 127.0.0.1 at 2015-04-13 20:20:18 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"81"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "81"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 81]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 81]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 7.4ms | ActiveRecord: 3.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 30], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 30], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 30], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 30], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:20:18 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 30]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 21ms (Views: 14.8ms | ActiveRecord: 4.4ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/86/edit" for 127.0.0.1 at 2015-04-13 20:20:18 +0200 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"86"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "86"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 14.6ms | ActiveRecord: 1.1ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 31], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 31], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 31], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 31], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:20:18 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 17.0ms | ActiveRecord: 2.0ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/91/payments" for 127.0.0.1 at 2015-04-13 20:20:18 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"91"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "91"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 91]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 7ms (Views: 3.5ms | ActiveRecord: 1.4ms)  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 32], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 32], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 32], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 32], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 32], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:20:18 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 15.3ms | ActiveRecord: 1.6ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2015-04-13 20:20:18 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 13.0ms | ActiveRecord: 0.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 33], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 33], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 33], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 33], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:20:18 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 33]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 16.4ms | ActiveRecord: 1.7ms) Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/101/adhesions" for 127.0.0.1 at 2015-04-13 20:20:18 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"101"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "101"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 101]] Redirected to http://www.example.com/adherent/members/101/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.6ms) Started GET "/adherent/members/101/adhesions/new" for 127.0.0.1 at 2015-04-13 20:20:18 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"101"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "101"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 101]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 101]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.6ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["member_id", 106], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["zip", 59000]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 106]]  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 2]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 106]] SQL (0.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 106]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x51a577a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x49464ee @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x49395dc @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x49395dc%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x476b534 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x45672e2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x43f81a4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x43f81a4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ecbe7c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5ecbe7c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 7ms (ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5f5396c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5eb0a8c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e80170 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e4ac3c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e176de @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"13/04/2016", "from_date"=>"13/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d99a2c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5d99a2c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"13/04/2016", "from_date"=>"13/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e940b2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5e940b2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"13/04/2016", "from_date"=>"13/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5f68d44 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5f2ad78 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5f2ad78%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.6ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5f0e4ca @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ee7bd6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.3ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ebd0b6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5ebd0b6%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e83686 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5e83686%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e52874 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e06e92 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ddf9aa @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5dbf81c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x5d9c01a @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5d9c056%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5d5ae4e @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5ce1da0 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 107]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 107 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 107], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 108]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 108 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 108], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 109]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 109 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 109], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 109 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 109], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 109], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 110]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 110 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 110], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 110 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 110], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 110], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 111]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 111 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 111], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 111 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 111], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 111], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 112]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 112 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 112], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 112 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 112], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 112], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 112], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 112]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 112]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 45], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["payment_id", 17], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 112], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 112]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 112]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 45], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["payment_id", 18], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 46], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["payment_id", 18], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 113]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 113 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 113], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 113 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 113], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 113], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 113], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 113]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 113]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 47]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 47], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 19], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 114]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 114 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 114], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 114 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 114], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 114], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 114], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 114]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 114]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 49]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 49], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 20], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 114], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 114]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 114]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 49]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 49], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 21], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 50]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 50], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 21], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 115]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 115 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 115], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 115 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 115], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 115], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 115], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 115]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 115]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 51]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 51], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 22], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 115], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 115]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 115]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 51]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 51], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 23], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 52]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 52], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 23], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 115], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 115]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 115]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 52]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 52], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 24], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.8ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 116]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 116 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 116], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 116 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 116], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 116], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.7ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 61], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 117], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/117/adhesions" for 127.0.0.1 at 2015-04-13 20:20:19 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"117"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 117]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 117]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 7.9ms | ActiveRecord: 2.4ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 62], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 118], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/118/adhesions" for 127.0.0.1 at 2015-04-13 20:20:19 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"118"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "118"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 118]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 118]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 56]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 56]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 7.3ms | ActiveRecord: 2.5ms) Started GET "/adherent/members/118/payments/new" for 127.0.0.1 at 2015-04-13 20:20:19 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"118"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "118"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 62]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 118]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 56]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.3ms | ActiveRecord: 2.1ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 63], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 119], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/119/adhesions" for 127.0.0.1 at 2015-04-13 20:20:19 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"119"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "119"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 119]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 119]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 57]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 57]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 8.3ms | ActiveRecord: 2.3ms) Started GET "/adherent/members/119/adhesions/57/edit" for 127.0.0.1 at 2015-04-13 20:20:19 +0200 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"119", "id"=>"57"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "119"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 119], ["id", "57"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 11.0ms | ActiveRecord: 1.9ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 64], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/120/adhesions/new" for 127.0.0.1 at 2015-04-13 20:20:19 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"120"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 120]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 120]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.6ms | ActiveRecord: 2.6ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 120]] Started POST "/adherent/members/120/adhesions" for 127.0.0.1 at 2015-04-13 20:20:19 +0200 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"120"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 120], ["to_date", Thu, 31 Jul 2014], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/120/adhesions Completed 302 Found in 16ms (ActiveRecord: 2.4ms) Started GET "/adherent/members/120/adhesions" for 127.0.0.1 at 2015-04-13 20:20:19 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"120"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 120]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 120]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 58]] CACHE (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 58]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 7.8ms | ActiveRecord: 3.0ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 120]] SQL (0.3ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 65], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/121/adhesions/new" for 127.0.0.1 at 2015-04-13 20:20:19 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"121"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "121"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 121]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 121]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.3ms | ActiveRecord: 1.6ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 2.6ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 67], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 67], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 122], ["to_date", Sat, 31 Aug 2013], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 123], ["to_date", Sat, 31 Aug 2013], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 67]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 123], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 123]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 60], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 25], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 122]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 67]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 122], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 122]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 59], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 26], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 68], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 68], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 124], ["to_date", Sat, 31 Aug 2013], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 125], ["to_date", Sat, 31 Aug 2013], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 125]] Organism Load (0.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 68]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 125], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 125]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 62], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 27], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 69], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 69], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 126], ["to_date", Sat, 31 Aug 2013], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 127], ["to_date", Sat, 31 Aug 2013], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 69]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 127], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 127]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 64]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 64], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 28], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 69]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 127], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 127]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 64]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 64], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 29], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 69]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 126], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 126]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 63]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 63], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 30], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 1], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 65], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]]  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 1], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 66]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 66], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 66]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 1], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 67]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 67], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 1], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 70], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 128], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 128]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 128]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Thu, 14 May 2015], ["member_id", 128], ["to_date", Fri, 13 May 2016], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 128]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 70]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 128], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 128]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 68]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 68], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 31], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 71], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 129], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 129]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 129]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Thu, 14 May 2015], ["member_id", 129], ["to_date", Fri, 13 May 2016], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 71]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 72) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 72) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 72], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 130], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 130]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 130]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Thu, 14 May 2015], ["member_id", 130], ["to_date", Fri, 13 May 2016], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 72]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 130], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 130]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 72]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 72], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 32], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 73]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 73], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 32], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 73) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 73) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 73], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 131], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 131]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 131]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Thu, 14 May 2015], ["member_id", 131], ["to_date", Fri, 13 May 2016], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 131]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 73]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 74) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 74) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 74], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 132], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 132]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 132]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["from_date", Thu, 14 May 2015], ["member_id", 132], ["to_date", Fri, 13 May 2016], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 74]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 132], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 132]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 76]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 76], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 33], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 77]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 77], ["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["payment_id", 33], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]]  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 75) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 75) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 75], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/133/coord/new" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"133"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "133"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 133]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 20.7ms | ActiveRecord: 1.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/133/coord" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"133"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "133"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 133]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 133], ["office", ""], ["tel", ""], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["zip", ""]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/133/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 3.1ms) Started GET "/adherent/members/133/adhesions/new" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"133"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "133"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 133]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 133]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.7ms | ActiveRecord: 1.8ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 76) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 76) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 76], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/134/coord/new" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"134"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "134"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 134]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 20.8ms | ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 77) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 77) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 77], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/135/coord/new" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"135"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "135"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 135]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (19.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 21.7ms | ActiveRecord: 1.5ms) Started POST "/adherent/members/135/coord" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"135"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "135"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 135]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 135], ["office", ""], ["tel", ""], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/135/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 2.9ms) Started GET "/adherent/members/135/adhesions/new" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"135"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "135"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 135]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 135]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (15.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 18.6ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 78) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 78) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 78], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/136/coord/new" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"136"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "136"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 136]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 21.3ms | ActiveRecord: 1.5ms) Started POST "/adherent/members/136/coord" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"136"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "136"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 136]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 136], ["office", ""], ["tel", ""], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/136/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 2.9ms) Started GET "/adherent/members/136/adhesions/new" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"136"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "136"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 136]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 136]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.2ms | ActiveRecord: 1.3ms) Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 136]]  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 79) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 79) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 79], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 137]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 137]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 137], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 137]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 79]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 137], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 137]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/137/payments" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"137"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "137"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 137]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 137]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (2.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.7ms) Completed 200 OK in 33ms (Views: 26.5ms | ActiveRecord: 4.2ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 80) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 80) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 80], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 138]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 138]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 138], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 80]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 138], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 138]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/138/payments" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"138"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "138"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 138]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 15.2ms | ActiveRecord: 3.1ms) Started GET "/adherent/payments/35/reglements/new" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"35"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "35"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.9ms | ActiveRecord: 3.4ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 81) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 81], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 139]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 139]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 139], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/139/payments/new" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"139"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "139"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 81]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 139]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 18.5ms | ActiveRecord: 1.7ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 139]] Started POST "/adherent/members/139/payments" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"139"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "139"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 139]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 81]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 139], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 139]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/139/payments Completed 302 Found in 12ms (ActiveRecord: 3.3ms) Started GET "/adherent/members/139/payments" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"139"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "139"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 139]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] CACHE (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 139]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.3ms | ActiveRecord: 3.3ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 139]] SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 82) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 82) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 82], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 140]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 140]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 140], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/140/payments/new" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"140"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "140"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 82]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 140]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.4ms | ActiveRecord: 1.7ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 83) LIMIT 1  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 83) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 83], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 141]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 141]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 141], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 83]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 141], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 141]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/141/payments/37" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"141", "id"=>"37"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "141"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 37 LIMIT 1 [["member_id", 141]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (5.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 21.0ms | ActiveRecord: 3.6ms) SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 84) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 84) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 84], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 142]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 142]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 142], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 84]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 142], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 142]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/142/payments/38" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"142", "id"=>"38"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "142"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 38 LIMIT 1 [["member_id", 142]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.2ms | ActiveRecord: 3.7ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 85) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 85) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 85], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 143]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 143]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 143], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 143]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 85]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 143], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 143]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/143/payments/39" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"143", "id"=>"39"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "143"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 39 LIMIT 1 [["member_id", 143]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 143]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.9ms | ActiveRecord: 5.8ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 86) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 86) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 86], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 144]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 144]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 144], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/144/payments/new" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"144"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "144"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 86]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 144]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.8ms | ActiveRecord: 1.7ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 87) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 87], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 145]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 145]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 145], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:20:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/145/payments/new" for 127.0.0.1 at 2015-04-13 20:20:20 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"145"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "145"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 87]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 145]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.5ms | ActiveRecord: 2.0ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (3.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.8ms) BEGIN SQL (11.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:24:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:24:08 UTC +00:00]]  (2.1ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:24:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 88], ["updated_at", Mon, 13 Apr 2015 18:24:08 UTC +00:00]]  (12.2ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:24:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 88], ["updated_at", Mon, 13 Apr 2015 18:24:08 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:24:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 88], ["updated_at", Mon, 13 Apr 2015 18:24:08 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:24:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 88], ["updated_at", Mon, 13 Apr 2015 18:24:08 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:24:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 88], ["updated_at", Mon, 13 Apr 2015 18:24:08 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 20:24:12 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (4.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 88]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (57.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (2.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (23.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.2ms) Completed 200 OK in 142ms (Views: 93.9ms | ActiveRecord: 13.1ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-04-13 20:24:12 +0200 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-04-13 20:24:12 +0200 Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-04-13 20:24:12 +0200 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-04-13 20:24:12 +0200 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-04-13 20:24:12 +0200 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-04-13 20:24:12 +0200 Started GET "/assets/adherent/icones/xls.png" for 127.0.0.1 at 2015-04-13 20:24:12 +0200 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-04-13 20:24:12 +0200 Started GET "/assets/adherent/icones/csv.png" for 127.0.0.1 at 2015-04-13 20:24:12 +0200 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-04-13 20:24:12 +0200 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-04-13 20:24:13 +0200 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-04-13 20:24:13 +0200 Started GET "/assets/forward_disabled.png" for 127.0.0.1 at 2015-04-13 20:24:13 +0200 Started GET "/assets/back_disabled.png" for 127.0.0.1 at 2015-04-13 20:24:13 +0200 Started GET "/adherent/members/delete_member_146?data%5Bconfirm%5D=Etes+vous+s%C3%BBr+%3F&method=delete" for 127.0.0.1 at 2015-04-13 20:24:13 +0200 Processing by Adherent::MembersController#show as HTML Parameters: {"data"=>{"confirm"=>"Etes vous sûr ?"}, "method"=>"delete", "id"=>"delete_member_146"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "delete_member_146"]] Completed 404 Not Found in 9ms  (0.9ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (2.3ms) select table_name from information_schema.views where table_schema = 'adh_test'  (299.5ms) TRUNCATE TABLE "adherent_coords", "adherent_members", "adherent_adhesions", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (1.2ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (1.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:24:16 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:24:16 UTC +00:00]]  (175.0ms) COMMIT Adherent::Member Exists (1.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.8ms) BEGIN Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (3.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:24:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:24:16 UTC +00:00]]  (3.5ms) COMMIT Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:24:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:24:16 UTC +00:00]]  (2.1ms) COMMIT Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:24:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:24:16 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:24:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:24:16 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:24:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:24:16 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (2.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.3ms) BEGIN SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:24:16 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 1], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 18:24:16 UTC +00:00]]  (2.4ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-04-13 20:24:16 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (28.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 43ms (Views: 28.7ms | ActiveRecord: 7.8ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-04-13 20:24:16 +0200 Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2015-04-13 20:24:17 +0200 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.7ms) BEGIN SQL (0.9ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (115.3ms) COMMIT Redirected to http://127.0.0.1:52393/adherent/members/1/adhesions Completed 302 Found in 128ms (ActiveRecord: 120.9ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-04-13 20:24:17 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:52393/adherent/members/1/adhesions/new Completed 302 Found in 8ms (ActiveRecord: 3.8ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2015-04-13 20:24:17 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (46.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (49.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 60ms (Views: 52.2ms | ActiveRecord: 2.2ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-04-13 20:24:18 +0200  (0.8ms) SELECT COUNT(*) FROM "adherent_adhesions"  (1.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (1.8ms) select table_name from information_schema.views where table_schema = 'adh_test'  (301.0ms) TRUNCATE TABLE "adherent_members", "adherent_adhesions", "adherent_coords", "adherent_reglements", "organisms", "adherent_payments" RESTART IDENTITY CASCADE;  (3.1ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:24:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 18:24:19 UTC +00:00]]  (2.1ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:24:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:24:19 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:24:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:24:19 UTC +00:00]]  (2.5ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:24:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:24:19 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:24:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:24:19 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 18:24:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 18:24:19 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) BEGIN Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 18:24:19 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Mon, 13 Apr 2015 18:24:19 UTC +00:00]] Adherent::Adhesion Load (2.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (2.6ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-04-13 20:24:19 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 1]] Adherent::Reglement Load (1.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (30.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 45ms (Views: 30.3ms | ActiveRecord: 8.4ms) Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-04-13 20:24:19 +0200 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-04-13 20:24:19 +0200 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-04-13 20:24:19 +0200 Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-04-13 20:24:20 +0200 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (5.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.3ms) BEGIN Adherent::Reglement Load (1.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] SQL (0.5ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (140.2ms) COMMIT Redirected to http://127.0.0.1:52393/adherent/members/1/payments Completed 302 Found in 167ms (ActiveRecord: 149.8ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2015-04-13 20:24:20 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.1ms | ActiveRecord: 5.1ms)  (2.7ms) SELECT COUNT(*) FROM "adherent_payments"  (2.1ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (4.8ms) select table_name from information_schema.views where table_schema = 'adh_test'  (228.2ms) TRUNCATE TABLE "adherent_members", "adherent_adhesions", "adherent_coords", "organisms", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (1.0ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 4]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 4], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 4]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 5]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 5], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 5]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 6]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 6]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 6], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 6]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 6]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/edit.html.erb within layouts/adherent/application (0.4ms) Completed 200 OK in 28ms (Views: 8.3ms | ActiveRecord: 4.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 1.7ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.6ms | ActiveRecord: 2.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x607b59c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x60884c2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 4ms (ActiveRecord: 1.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as XLS Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 8]] Sent data Mon association-13-avr-2015-Membres.xls (1.7ms) Completed 200 OK in 12ms (Views: 1.5ms | ActiveRecord: 4.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 9]] Sent data Mon association-13-avr-2015-Membres.csv (0.4ms) Completed 200 OK in 8ms (Views: 0.2ms | ActiveRecord: 2.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.7ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 12], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/7/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.5ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 13], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/8/coord/new Completed 302 Found in 9ms (ActiveRecord: 3.1ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 14], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/9/coord/new Completed 302 Found in 9ms (ActiveRecord: 3.2ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"10"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/10 Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"11"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"12"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/12 Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"13"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 13 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 13 [["name", "Dalton"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/13 Completed 302 Found in 11ms (ActiveRecord: 3.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/14/adhesions/new" for 127.0.0.1 at 2015-04-13 23:27:48 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"14"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 14]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (34.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (25.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.4ms) Completed 200 OK in 83ms (Views: 76.0ms | ActiveRecord: 2.0ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/15/adhesions/new" for 127.0.0.1 at 2015-04-13 23:27:48 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"15"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 15]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.1ms | ActiveRecord: 1.7ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 15]] Started POST "/adherent/members/15/adhesions" for 127.0.0.1 at 2015-04-13 23:27:48 +0200 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"15"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 15], ["to_date", Thu, 31 Jul 2014], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/15/adhesions Completed 302 Found in 9ms (ActiveRecord: 2.3ms) Started GET "/adherent/members/15/adhesions" for 127.0.0.1 at 2015-04-13 23:27:48 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"15"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 15]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 15]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 18.6ms | ActiveRecord: 6.9ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 15]] SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 16], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/16/adhesions" for 127.0.0.1 at 2015-04-13 23:27:48 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"16"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 16]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 16]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 7.8ms | ActiveRecord: 2.3ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 17], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/17/adhesions" for 127.0.0.1 at 2015-04-13 23:27:48 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"17"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 17]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 17]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.1ms | ActiveRecord: 2.9ms) Started GET "/adherent/members/17/adhesions/6/edit" for 127.0.0.1 at 2015-04-13 23:27:48 +0200 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"17", "id"=>"6"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 17], ["id", "6"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 16.4ms | ActiveRecord: 1.8ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 18], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 21:27:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/18/adhesions" for 127.0.0.1 at 2015-04-13 23:27:48 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"18"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "18"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 18]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 18]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 8.4ms | ActiveRecord: 3.1ms) Started GET "/adherent/members/18/payments/new" for 127.0.0.1 at 2015-04-13 23:27:48 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"18"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "18"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 24]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 18]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (19.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 61ms (Views: 27.1ms | ActiveRecord: 6.3ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.8ms) BEGIN SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:49 UTC +00:00]]  (114.9ms) COMMIT Adherent::Member Exists (1.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.6ms) BEGIN Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Mon, 13 Apr 2015 21:27:49 UTC +00:00]]  (3.2ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 25], ["updated_at", Mon, 13 Apr 2015 21:27:49 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 25], ["updated_at", Mon, 13 Apr 2015 21:27:49 UTC +00:00]]  (2.1ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 25], ["updated_at", Mon, 13 Apr 2015 21:27:49 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 25], ["updated_at", Mon, 13 Apr 2015 21:27:49 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.8ms) BEGIN Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 25]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:27:49 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 19], ["mode", "Chèque"], ["updated_at", Mon, 13 Apr 2015 21:27:49 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 19]]  (1.2ms) COMMIT Started GET "/adherent/members/19/payments/1" for 127.0.0.1 at 2015-04-13 23:27:53 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"19", "id"=>"1"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "19"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 19]] Adherent::Reglement Load (1.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (7.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 62ms (Views: 33.7ms | ActiveRecord: 18.6ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-04-13 23:27:53 +0200 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-04-13 23:27:53 +0200 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-04-13 23:27:53 +0200 Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-04-13 23:27:53 +0200 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-04-13 23:27:53 +0200 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-04-13 23:27:53 +0200 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-04-13 23:27:53 +0200 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-04-13 23:27:53 +0200 Started DELETE "/adherent/members/19/payments/1" for 127.0.0.1 at 2015-04-13 23:27:54 +0200 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"19", "id"=>"1"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "19"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 19], ["id", "1"]]  (0.2ms) BEGIN Adherent::Reglement Load (1.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] SQL (0.6ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (66.2ms) COMMIT Redirected to http://127.0.0.1:34198/adherent/members/19/payments Completed 302 Found in 93ms (ActiveRecord: 79.4ms) Started GET "/adherent/members/19/payments" for 127.0.0.1 at 2015-04-13 23:27:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"19"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "19"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 19]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 14.1ms | ActiveRecord: 12.0ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-04-13 23:27:54 +0200  (2.0ms) SELECT COUNT(*) FROM "adherent_payments"  (0.6ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (2.2ms) select table_name from information_schema.views where table_schema = 'adh_test'  (84.6ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:55 UTC +00:00]]  (98.0ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:55 UTC +00:00]]  (2.2ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:55 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:55 UTC +00:00]]  (3.5ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:55 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:55 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 23:27:55 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 55ms (Views: 46.7ms | ActiveRecord: 6.1ms) Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-04-13 23:27:55 +0200 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-04-13 23:27:55 +0200 Started GET "/assets/adherent/icones/csv.png" for 127.0.0.1 at 2015-04-13 23:27:55 +0200 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-04-13 23:27:55 +0200 Started GET "/assets/adherent/icones/xls.png" for 127.0.0.1 at 2015-04-13 23:27:55 +0200 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-04-13 23:27:55 +0200 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-04-13 23:27:55 +0200 Started GET "/assets/forward_disabled.png" for 127.0.0.1 at 2015-04-13 23:27:55 +0200 Started GET "/assets/back_disabled.png" for 127.0.0.1 at 2015-04-13 23:27:56 +0200 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2015-04-13 23:27:56 +0200 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.1ms) BEGIN Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] SQL (0.8ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (155.6ms) COMMIT Redirected to http://127.0.0.1:34198/adherent/members Completed 302 Found in 173ms (ActiveRecord: 161.5ms) Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 23:27:56 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 15.6ms | ActiveRecord: 2.1ms)  (1.7ms) SELECT COUNT(*) FROM "adherent_members"  (1.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (3.2ms) select table_name from information_schema.views where table_schema = 'adh_test'  (148.5ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_reglements", "organisms", "adherent_payments" RESTART IDENTITY CASCADE;  (0.6ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:27:58 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:58 UTC +00:00]]  (1.0ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:58 UTC +00:00]]  (2.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:58 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:58 UTC +00:00]]  (0.9ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:27:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:27:58 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.3ms) BEGIN SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:27:58 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 1], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:27:58 UTC +00:00]]  (1.0ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-04-13 23:27:58 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (1.0ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 10.9ms | ActiveRecord: 12.4ms) Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2015-04-13 23:27:59 +0200 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (149.1ms) COMMIT Redirected to http://127.0.0.1:34198/adherent/members/1/adhesions Completed 302 Found in 160ms (ActiveRecord: 152.9ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-04-13 23:27:59 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (1.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:34198/adherent/members/1/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2015-04-13 23:27:59 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (33.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 54ms (Views: 37.6ms | ActiveRecord: 5.4ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-04-13 23:27:59 +0200  (1.1ms) SELECT COUNT(*) FROM "adherent_adhesions"  (1.2ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (526.3ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.6ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:00 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:28:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:28:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:28:00 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:00 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 1], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/1/payments/new" for 127.0.0.1 at 2015-04-13 23:28:00 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Adhesion Load (2.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 15.0ms | ActiveRecord: 4.9ms) Started POST "/adherent/members/1/payments" for 127.0.0.1 at 2015-04-13 23:28:00 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 21:28:00 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 1], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:00 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 1], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:00 UTC +00:00], ["payment_id", 1], ["updated_at", Mon, 13 Apr 2015 21:28:00 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/1/payments Completed 302 Found in 27ms (ActiveRecord: 6.5ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2015-04-13 23:28:00 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (18.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 20.0ms | ActiveRecord: 5.4ms) Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 1]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 2]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 2]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:00 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 2], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 3]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 3]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:00 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 3], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:00 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/1/reglements/new" for 127.0.0.1 at 2015-04-13 23:28:00 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 2]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 3]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (18.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.4ms) Completed 200 OK in 36ms (Views: 24.4ms | ActiveRecord: 5.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 2], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 2], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 4]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 4], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/4/payments/new" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 2]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 13.2ms | ActiveRecord: 5.1ms) Started POST "/adherent/members/4/payments" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 4]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 2]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 4], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 4], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["payment_id", 2], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/4/payments Completed 302 Found in 20ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/4/payments" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 4]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 4]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 4]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.4ms | ActiveRecord: 5.3ms) Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 4]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 5]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 5], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 6]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 6]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 6], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/2/reglements/new" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"2"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 4]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 6]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (17.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 19.7ms | ActiveRecord: 5.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 3], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 3], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 7]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 7]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 7], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/7/payments/new" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"7"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "7"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 3]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 13.4ms | ActiveRecord: 3.7ms) Started POST "/adherent/members/7/payments" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"7"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "7"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 3]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 7], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 7], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["payment_id", 3], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/7/payments Completed 302 Found in 19ms (ActiveRecord: 5.7ms) Started GET "/adherent/members/7/payments" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"7"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 7]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.1ms | ActiveRecord: 5.1ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 7]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 8]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 8]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 8], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 9]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 9]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 9], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/3/reglements/new" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"3"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 9]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 18.6ms | ActiveRecord: 5.4ms) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 7]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 4], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 4], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 10]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 10]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 10], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/10/payments/new" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"10"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "10"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 4]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 10]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 12.7ms | ActiveRecord: 4.9ms) Started POST "/adherent/members/10/payments" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"10"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "10"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 10]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 4]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 10], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 10]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 10], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["payment_id", 4], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/10/payments Completed 302 Found in 19ms (ActiveRecord: 6.0ms) Started GET "/adherent/members/10/payments" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"10"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Payment Load (1.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 10]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 10]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 10]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.6ms | ActiveRecord: 6.8ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 10]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 11]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 11], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 12]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 12]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 12], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/4/reglements/new" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"4"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 10]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 12]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 17.1ms | ActiveRecord: 5.2ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 5], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 5], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 5], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 13]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 13]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 13], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/13/payments/new" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"13"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 5]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 13]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.5ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/13/payments" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"13"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 5]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 13], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 13], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["payment_id", 5], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/13/payments Completed 302 Found in 19ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/13/payments" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"13"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 13]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.7ms | ActiveRecord: 4.9ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 13]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 14]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 14]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 14], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 15]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 15]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 15], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/5/reglements/new" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"5"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (18.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 19.8ms | ActiveRecord: 8.0ms) Started POST "/adherent/payments/5/reglements" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"14"}, "commit"=>"Enregistrer", "payment_id"=>"5"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 14], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["payment_id", 5], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Redirected to http://www.example.com/adherent/members/13/payments Completed 302 Found in 13ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/13/payments" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"13"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 13]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 16.7ms | ActiveRecord: 4.7ms) Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 6], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 6], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 6], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 16]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 16]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 16], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/16/payments/new" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"16"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 6]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 16]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.6ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/16/payments" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"16"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 6]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 16], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 16]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 16], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["payment_id", 6], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/16/payments Completed 302 Found in 19ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/16/payments" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"16"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 16]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.0ms | ActiveRecord: 5.0ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 16]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 17]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 17]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 17], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 18]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 18]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 18], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/6/reglements/new" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"6"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "6"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 18]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.9ms | ActiveRecord: 5.5ms) Started POST "/adherent/payments/6/reglements" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"17"}, "commit"=>"Enregistrer", "payment_id"=>"6"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "6"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 17], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["payment_id", 6], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Redirected to http://www.example.com/adherent/members/16/payments Completed 302 Found in 14ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/16/payments" for 127.0.0.1 at 2015-04-13 23:28:01 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"16"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.2ms | ActiveRecord: 5.5ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 7], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 7], ["updated_at", Mon, 13 Apr 2015 21:28:01 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 7], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 19]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 19]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 19], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/19/payments/new" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"19"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "19"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 19]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 15.6ms | ActiveRecord: 4.2ms) Started POST "/adherent/members/19/payments" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"19"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "19"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 7]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 19], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 19]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 19], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["payment_id", 7], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/19/payments Completed 302 Found in 17ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/19/payments" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"19"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "19"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 19]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.9ms | ActiveRecord: 4.5ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 19]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 20]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 20]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 20], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 21]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 21]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 21], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/7/reglements/new" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"7"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 21]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.3ms | ActiveRecord: 5.1ms) Started POST "/adherent/payments/7/reglements" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"20"}, "commit"=>"Enregistrer", "payment_id"=>"7"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "20"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 20], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["payment_id", 7], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Redirected to http://www.example.com/adherent/members/19/payments Completed 302 Found in 12ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/19/payments" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"19"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "19"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 19]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 17.3ms | ActiveRecord: 5.7ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 8], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 8], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 8], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 22]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 22]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 22], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/22/payments/new" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"22"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "22"]] Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 8]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 22]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 14.4ms | ActiveRecord: 3.2ms) Started POST "/adherent/members/22/payments" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"22"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "22"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 8]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 22], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 22]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 22], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["payment_id", 8], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/22/payments Completed 302 Found in 18ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/22/payments" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"22"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "22"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 22]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.1ms | ActiveRecord: 4.6ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 22]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 23]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 23]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 23], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 24]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 24]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 24], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/8/reglements/new" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"8"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 18.9ms | ActiveRecord: 5.3ms) Started POST "/adherent/payments/8/reglements" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"23"}, "commit"=>"Enregistrer", "payment_id"=>"8"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "23"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 23], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["payment_id", 8], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]] Redirected to http://www.example.com/adherent/members/22/payments Completed 302 Found in 13ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/22/payments" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"22"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "22"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 22]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (22.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 24.0ms | ActiveRecord: 5.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 9], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 9], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 9], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 25]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 25]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 25], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/25/payments/new" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"25"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "25"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 9]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 25]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.5ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/25/payments" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"25"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "25"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 9]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 25], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 25]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 25], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["payment_id", 9], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/25/payments Completed 302 Found in 18ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/25/payments" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"25"} Organism Load (2.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "25"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 25]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 20.4ms | ActiveRecord: 6.1ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 25]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 26]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 26]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 26], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 27]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 27]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 27], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/9/reglements/new" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"9"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (23.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40ms (Views: 26.9ms | ActiveRecord: 6.5ms) Started POST "/adherent/payments/9/reglements" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"26"}, "commit"=>"Enregistrer", "payment_id"=>"9"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 26], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["payment_id", 9], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]] Redirected to http://www.example.com/adherent/members/25/payments Completed 302 Found in 15ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/25/payments" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"25"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "25"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 25]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (25.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 26.7ms | ActiveRecord: 5.4ms) Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 10], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 10], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (1.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 10], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 28]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 28]]  (2.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 28], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/28/payments/new" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"28"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "28"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 10]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 28]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 13.7ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/28/payments" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"28"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "28"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 28]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 10]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 28], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 28]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 28], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["payment_id", 10], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/28/payments Completed 302 Found in 18ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/28/payments" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"28"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "28"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 28]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 28]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.8ms | ActiveRecord: 4.5ms)  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 28]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 11], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 11], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 11], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 31]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 31]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 31], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/31/payments/new" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"31"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 11]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 31]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.6ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/31/payments" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"31"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 31]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 11]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 31], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 31]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 29], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["payment_id", 11], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/31/payments Completed 302 Found in 19ms (ActiveRecord: 6.0ms) Started GET "/adherent/members/31/payments" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"31"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 31]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.5ms | ActiveRecord: 4.0ms) Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 31]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 12], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 12], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 12], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 34]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 34]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 34], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/34/payments/new" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"34"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "34"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 12]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 34]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.2ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/34/payments" for 127.0.0.1 at 2015-04-13 23:28:02 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"34"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "34"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 12]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 34], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:02 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 34]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 30], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["payment_id", 12], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/34/payments Completed 302 Found in 18ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/34/payments" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"34"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "34"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 34]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.3ms | ActiveRecord: 4.1ms)  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 34]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 13], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 13], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 13], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 37]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 37]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 37], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 37]] Started GET "/adherent/members/37/payments/new" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"37"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "37"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 37]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.6ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/37/payments" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"37"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "37"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 13]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 37], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 37]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 31], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["payment_id", 13], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/37/payments Completed 302 Found in 18ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/37/payments" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"37"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "37"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 37]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.9ms | ActiveRecord: 4.2ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 37]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 14], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 14], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 40]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 40]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 40], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/40/payments/new" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"40"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "40"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 40]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.1ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/40/payments" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"40"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "40"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 40]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 14]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 40], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 40]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 32], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["payment_id", 14], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/40/payments Completed 302 Found in 17ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/40/payments" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"40"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "40"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 40]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 40]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 40]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (19.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 21.2ms | ActiveRecord: 4.3ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 15], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 15], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 43]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 43]]  (1.9ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 43], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/43/payments/new" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"43"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "43"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 43]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.6ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/43/payments" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"43"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "43"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 43]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 15]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 43], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 43]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 33], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["payment_id", 15], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/43/payments Completed 302 Found in 23ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/43/payments" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"43"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "43"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 43]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 43]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 43]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.9ms | ActiveRecord: 4.3ms)  (0.6ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 43]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 16], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 16], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 16], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 46]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 46]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 46], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/46/payments/new" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"46"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "46"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 46]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.1ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/46/payments" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"46"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "46"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 46]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 16]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 46], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 46]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 34], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["payment_id", 16], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/46/payments Completed 302 Found in 24ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/46/payments" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"46"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "46"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 46]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 46]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 46]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.7ms | ActiveRecord: 4.4ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 46]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 17], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 49]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 49]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 49], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 49]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 17]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 49], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 49]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/49/payments/17" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"49", "id"=>"17"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "49"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 17 LIMIT 1 [["member_id", 49]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 49]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.5ms | ActiveRecord: 4.8ms) SQL (0.7ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 50]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 50]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 50], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 50]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 18]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 50], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 50]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/50/payments/18" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"50", "id"=>"18"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "50"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 18 LIMIT 1 [["member_id", 50]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 50]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 11.5ms | ActiveRecord: 5.1ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 51]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 51]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 51], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 51]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 19]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 51], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 51]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/51/payments/19" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"51", "id"=>"19"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "51"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 19 LIMIT 1 [["member_id", 51]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 51]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 12.4ms | ActiveRecord: 4.5ms) SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 52]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 52]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 52], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/52/payments/new" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"52"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "52"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 52]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.6ms | ActiveRecord: 4.2ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 53]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 53]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 53], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/53/payments/new" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"53"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "53"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 21]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 53]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.3ms) Completed 200 OK in 19ms (Views: 13.1ms | ActiveRecord: 1.7ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 54]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 54]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 54], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/54/payments/new" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"54"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "54"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 54]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.0ms | ActiveRecord: 2.3ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 55]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 55]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 55], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/55/payments/new" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"55"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "55"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.3ms | ActiveRecord: 2.3ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 55]] Started POST "/adherent/members/55/payments" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"13/04/2015", "comment"=>"", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"55"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "55"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 55]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 23]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 55], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 55]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/55/payments Completed 302 Found in 13ms (ActiveRecord: 3.7ms) Started GET "/adherent/members/55/payments" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"55"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "55"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 55]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 55]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.7ms | ActiveRecord: 3.6ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 55]] SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 56]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 56]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 56], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 56]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 24]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 56], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 56]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/56/payments" for 127.0.0.1 at 2015-04-13 23:28:03 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"56"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "56"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 56]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 56]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.0ms | ActiveRecord: 3.2ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 57]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 57]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 57], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 57]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 25]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 57], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 57]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/57/payments" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"57"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "57"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 57]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 57]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.9ms | ActiveRecord: 3.3ms) Started GET "/adherent/payments/22/reglements/new" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"22"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "22"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 57]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.7ms | ActiveRecord: 3.8ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5f7ca92 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x611a3cc @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x60ecf4e @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x60ecfb2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 29], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 29], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 29], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 29], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.8ms | ActiveRecord: 3.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 30], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 30], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 30], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 30], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 30]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 15.2ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 31], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 31], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 31], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 31], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 15.6ms | ActiveRecord: 3.6ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 68]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 68]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 68], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/68/adhesions" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"68"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 68]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 68]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 44]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 44]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 9.2ms | ActiveRecord: 2.8ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 32], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 32], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 32], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 32], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 32], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 15.4ms | ActiveRecord: 2.0ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/73/adhesions" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"73"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "73"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 73]] Redirected to http://www.example.com/adherent/members/73/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.3ms) Started GET "/adherent/members/73/adhesions/new" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"73"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "73"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 73]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 73]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.4ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 33], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 33], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 33], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 33], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 33]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 15.9ms | ActiveRecord: 3.7ms) Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["member_id", 78], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 78]] Started GET "/adherent/members/78/coord" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"78"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "78"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 78]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 12ms (Views: 7.1ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 34], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 34], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 34], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 34], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 15.8ms | ActiveRecord: 1.6ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 17.0ms | ActiveRecord: 0.7ms)  (0.5ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 35], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 35], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 35], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 35], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 35], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (2.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.5ms | ActiveRecord: 4.2ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/88/coord" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"88"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "88"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 88]] Redirected to http://www.example.com/adherent/members/88/coord/new Completed 302 Found in 6ms (ActiveRecord: 2.6ms) Started GET "/adherent/members/88/coord/new" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"88"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "88"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 88]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (21.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 27.1ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 36], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 36], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 36], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 36], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 36], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 36]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 16.0ms | ActiveRecord: 1.7ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/93/payments" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"93"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 93]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 9ms (Views: 4.8ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 37], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 37], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 37], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 37], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 37], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" WHERE "adherent_query_members"."organism_id" = $1 [["organism_id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 14.7ms | ActiveRecord: 1.7ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/98/edit" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"98"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "98"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 14.7ms | ActiveRecord: 1.2ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 38], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 38], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 38], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 38], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 38], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 13.2ms | ActiveRecord: 0.5ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 38], ["updated_at", Mon, 13 Apr 2015 21:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/108/coord/new Completed 302 Found in 9ms (ActiveRecord: 2.8ms) Started GET "/adherent/members/108/coord/new" for 127.0.0.1 at 2015-04-13 23:28:04 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"108"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 108]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 20.6ms | ActiveRecord: 1.5ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 39], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 109], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 109]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 109]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Thu, 14 May 2015], ["member_id", 109], ["to_date", Fri, 13 May 2016], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 109]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 39]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 109], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 109]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 45], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 23], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 46], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 23], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 40], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 110], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 110]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 110]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Thu, 14 May 2015], ["member_id", 110], ["to_date", Fri, 13 May 2016], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 110]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 40]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 110], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 110]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 47]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 47], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 24], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 41], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 111], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 111]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 111]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Thu, 14 May 2015], ["member_id", 111], ["to_date", Fri, 13 May 2016], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 111]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 41]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 42], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 112], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 112]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 112]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Thu, 14 May 2015], ["member_id", 112], ["to_date", Fri, 13 May 2016], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 112]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 42]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 112], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 112]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 51]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 51], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 25], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 52]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 52], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 25], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 43], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 113], ["to_date", Wed, 13 May 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 113]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 113]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Thu, 14 May 2015], ["member_id", 113], ["to_date", Fri, 13 May 2016], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 113]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 43]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5bd8436 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 3.1ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ba8664 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5b7a99e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.8ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x5b484f8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5b484f8%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x5b17f06 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5adbeca @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.9ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ac152a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5aa733c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 1.3ms)  (0.3ms) ROLLBACK  (1.0ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5a84f58 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5a6654e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5a6654e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5a495d4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5a495d4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.9ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["member_id", 114], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["zip", 59000]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 114]]  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 2]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 114]] SQL (0.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 114]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 115]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 115 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 115], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 116]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 116 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 116], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 117]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 117 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 117], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 117 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 117], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 117], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 118]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 118 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 118], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 118 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 118], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 118], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 119]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 119 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 119], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 119 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 119], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 119], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 119], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 119]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 119]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 59], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 26], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 119], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 119]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 119]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 59], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 27], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 60], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 27], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.4ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 120]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 120 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 120], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 120 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 120], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 120], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 120], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 120]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 61]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 61], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 28], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 120], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 120]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 61]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 61], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 29], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 62], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 29], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 120], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 120]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 62], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 30], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (1.1ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 121]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 121 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 121], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 121 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 121], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 121], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 121], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 121]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 121]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 63]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 63], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 31], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 122]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 122 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 122], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 122 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 122], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 122], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 122], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 122]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 122]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 65], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 32], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 122], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 122]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 122]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 65], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 33], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 66]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 66], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 33], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 123]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 123 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 123], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 123 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 123], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 123], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 124]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 124 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 124], ["tel", "01.02.03.04.05"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 124 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 124], ["to_date", Sat, 31 Jan 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 124], ["to_date", Sat, 28 Feb 2015], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 55], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 55], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 125], ["to_date", Sat, 31 Aug 2013], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 126], ["to_date", Sat, 31 Aug 2013], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 55]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 126], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 126]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 72]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 72], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 34], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 55]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 126], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 126]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 72]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 72], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 35], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 125]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 55]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 125], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 125]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 71], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 36], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 56], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 56], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 127], ["to_date", Sat, 31 Aug 2013], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 128], ["to_date", Sat, 31 Aug 2013], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 128]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 56]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 128], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 128]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 74]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 74], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 37], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 57], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 57], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 129], ["to_date", Sat, 31 Aug 2013], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 130], ["to_date", Sat, 31 Aug 2013], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 57]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 130], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 130]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 76]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 76], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 38], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 57]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["date", Mon, 13 Apr 2015], ["member_id", 129], ["mode", "CB"], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 129]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 75]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 75], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00], ["payment_id", 39], ["updated_at", Mon, 13 Apr 2015 21:28:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 1], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 77]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 77], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["payment_id", 1], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.5ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 1], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 78]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 78], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["payment_id", 1], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 78]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["from_date", Mon, 13 Apr 2015], ["member_id", 1], ["to_date", Tue, 12 Apr 2016], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 79]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 79], ["amount", #], ["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["payment_id", 1], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 79]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 79]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 58], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/131/coord/new" for 127.0.0.1 at 2015-04-13 23:28:06 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"131"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "131"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 131]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (19.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.0ms) Completed 200 OK in 36ms (Views: 31.4ms | ActiveRecord: 1.6ms) Started POST "/adherent/members/131/coord" for 127.0.0.1 at 2015-04-13 23:28:06 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"131"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "131"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 131]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 131], ["office", ""], ["tel", ""], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/131/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 3.1ms) Started GET "/adherent/members/131/adhesions/new" for 127.0.0.1 at 2015-04-13 23:28:06 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"131"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "131"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 131]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 131]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 16.1ms | ActiveRecord: 1.6ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 59], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/132/coord/new" for 127.0.0.1 at 2015-04-13 23:28:06 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"132"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 132]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 22.0ms | ActiveRecord: 1.5ms) Started POST "/adherent/members/132/coord" for 127.0.0.1 at 2015-04-13 23:28:06 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"132"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 132]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 132], ["office", ""], ["tel", ""], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/132/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 3.1ms) Started GET "/adherent/members/132/adhesions/new" for 127.0.0.1 at 2015-04-13 23:28:06 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"132"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 132]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 132]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.0ms | ActiveRecord: 1.6ms) Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 132]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 60], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/133/coord/new" for 127.0.0.1 at 2015-04-13 23:28:06 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"133"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "133"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 133]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 19.8ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 61], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/134/coord/new" for 127.0.0.1 at 2015-04-13 23:28:06 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"134"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "134"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 134]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 19.9ms | ActiveRecord: 1.2ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/134/coord" for 127.0.0.1 at 2015-04-13 23:28:06 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"134"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "134"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 134]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 134], ["office", ""], ["tel", ""], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/134/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 3.5ms) Started GET "/adherent/members/134/adhesions/new" for 127.0.0.1 at 2015-04-13 23:28:06 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"134"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "134"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 134]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 134]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.9ms | ActiveRecord: 1.8ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 3.5ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x4abf730 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x4ab85ca @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.3ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"13/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x4adda5a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.8ms | ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"13/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x48f1390 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x48f1390%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"13/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x467175a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x467175a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 13ms (ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5f7c4f2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.8ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x611564c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.7ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x60ec0b2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x60a9794 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.9ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6080a74 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x60381ca @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"13/04/2016", "from_date"=>"13/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5f8157e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 1.1ms | ActiveRecord: 2.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"13/04/2016", "from_date"=>"13/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x613811a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x613811a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"13/04/2016", "from_date"=>"13/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x60e39ee @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x60e39ee%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x609b9d2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6066228 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x60402ee @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x60402ee%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.1ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x60180e6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ff721a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5fd0426 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5fd0426%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5faa230 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Mon, 13 Apr 2015 21:28:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5faa230%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.8ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.8ms) SAVEPOINT active_record_1 SQL (120.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:32 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 1], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:32 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1  (22.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 80]]  (0.3ms) SAVEPOINT active_record_1 SQL (35.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 80], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["payment_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (3.0ms) ROLLBACK  (0.7ms) BEGIN  (0.9ms) COMMIT  (0.9ms) BEGIN  (0.8ms) SAVEPOINT active_record_1 SQL (2.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 1], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 81]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 81], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["payment_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1  (1.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 81]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 81]]  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.5ms) BEGIN  (0.6ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 1], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 82]]  (1.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 82], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["payment_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 82]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.5ms) COMMIT  (0.4ms) BEGIN  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (3.5ms) COMMIT  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) COMMIT  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.4ms) COMMIT  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) COMMIT  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.4ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (15.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (37.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 83) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 83) LIMIT 1 SQL (58.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 83], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 83) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 83) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 83], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 135], ["to_date", Sat, 31 Aug 2013], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 136], ["to_date", Sat, 31 Aug 2013], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 136]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 83]] SQL (73.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 136], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]] Adherent::Adhesion Load (14.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 136]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 84]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 84], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["payment_id", 40], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 136]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 83]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 136], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 136]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 84]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 84], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["payment_id", 41], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 135]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 83]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 135], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 135]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 83]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 83], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["payment_id", 42], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 84) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 84) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 84], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 84) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 84) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 84], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 137], ["to_date", Sat, 31 Aug 2013], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 138], ["to_date", Sat, 31 Aug 2013], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 84]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 138], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 138]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 86]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 86], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["payment_id", 43], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 137]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 84]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 137], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 137]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 85]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 85], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["payment_id", 44], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (1.0ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 85) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 85) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 85], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 85) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 85) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 85], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 139], ["to_date", Sat, 31 Aug 2013], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 140], ["to_date", Sat, 31 Aug 2013], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 140]] Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 85]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 140], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 140]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 88]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 88], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00], ["payment_id", 45], ["updated_at", Tue, 14 Apr 2015 18:21:33 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 86) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 86) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 86], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 86) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 86) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 86], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 86) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 86) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 86], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 141]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 141]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 141], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/141/payments/new" for 127.0.0.1 at 2015-04-14 20:21:34 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"141"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "141"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 86]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 141]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 89]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (142.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (24.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.1ms) Completed 200 OK in 197ms (Views: 187.9ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/141/payments" for 127.0.0.1 at 2015-04-14 20:21:34 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"141"} Organism Load (2.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "141"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 86]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 141], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 141]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 89]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 89], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["payment_id", 46], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/141/payments Completed 302 Found in 28ms (ActiveRecord: 7.9ms) Started GET "/adherent/members/141/payments" for 127.0.0.1 at 2015-04-14 20:21:34 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"141"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "141"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 141]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 89]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 21.7ms | ActiveRecord: 5.8ms)  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 141]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 87) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 87], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 87) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 87], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 87) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 87], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 144]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 144]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 144], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/144/payments/new" for 127.0.0.1 at 2015-04-14 20:21:34 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"144"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "144"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 87]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 144]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 90]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.2ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/144/payments" for 127.0.0.1 at 2015-04-14 20:21:34 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"144"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "144"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 144]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 87]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 144], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 144]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 90]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 90], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["payment_id", 47], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/144/payments Completed 302 Found in 17ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/144/payments" for 127.0.0.1 at 2015-04-14 20:21:34 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"144"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "144"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 144]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 90]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 144]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 144]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.4ms | ActiveRecord: 4.6ms) Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 144]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 90]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 88], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 88], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 88], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 147]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 147]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 147], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/147/payments/new" for 127.0.0.1 at 2015-04-14 20:21:34 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"147"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "147"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 88]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 147]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 91]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.3ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/147/payments" for 127.0.0.1 at 2015-04-14 20:21:34 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"147"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "147"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 147]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 88]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 147], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 147]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 91]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 91], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["payment_id", 48], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/147/payments Completed 302 Found in 16ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/147/payments" for 127.0.0.1 at 2015-04-14 20:21:34 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"147"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "147"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 147]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 91]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 147]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 147]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.9ms | ActiveRecord: 3.9ms)  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 147]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.9ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 89) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 89) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 89], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 89) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 89) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 89], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 89) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 89) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 89], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 150]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 150]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 150], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/150/payments/new" for 127.0.0.1 at 2015-04-14 20:21:34 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"150"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "150"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 89]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 150]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 92]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.1ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/150/payments" for 127.0.0.1 at 2015-04-14 20:21:34 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"150"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "150"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 150]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 89]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 150], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 150]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 92]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 92], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["payment_id", 49], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/150/payments Completed 302 Found in 17ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/150/payments" for 127.0.0.1 at 2015-04-14 20:21:34 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"150"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "150"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 150]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 92]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 150]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 150]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.9ms | ActiveRecord: 4.7ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 150]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 90) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 90) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 90], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 90) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 90) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 90], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 90) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 90) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 90], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 153]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 153]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 153], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/153/payments/new" for 127.0.0.1 at 2015-04-14 20:21:34 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"153"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "153"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 90]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 153]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 93]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.7ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/153/payments" for 127.0.0.1 at 2015-04-14 20:21:34 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"153"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "153"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 153]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 90]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 153], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 153]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 93]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 93], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["payment_id", 50], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/153/payments Completed 302 Found in 16ms (ActiveRecord: 4.2ms) Started GET "/adherent/members/153/payments" for 127.0.0.1 at 2015-04-14 20:21:34 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"153"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "153"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 153]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 93]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 153]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 153]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.9ms | ActiveRecord: 5.0ms)  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 153]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 91) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 91) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 91], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 91) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 91) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 91], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 91) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 91) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 91], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 156]] Adherent::Adhesion Load (1.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 156]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 156], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.1ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/156/payments/new" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"156"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "156"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 91]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 156]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 94]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (13.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 17.4ms | ActiveRecord: 4.0ms) Started POST "/adherent/members/156/payments" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"156"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "156"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 156]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 91]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 156], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 156]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 94]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 94], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["payment_id", 51], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/156/payments Completed 302 Found in 17ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/156/payments" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"156"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "156"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 156]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 94]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 156]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 156]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.7ms | ActiveRecord: 4.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 92) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 92) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 92], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 92) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 92) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 92], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 92) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 92) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 92], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 159]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 159]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 159], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 159]] Started GET "/adherent/members/159/payments/new" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"159"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "159"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 92]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 159]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 95]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.0ms | ActiveRecord: 2.0ms) Started POST "/adherent/members/159/payments" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"159"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "159"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 92]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 159], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 159]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 95]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 95], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["payment_id", 52], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/159/payments Completed 302 Found in 15ms (ActiveRecord: 4.2ms) Started GET "/adherent/members/159/payments" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"159"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "159"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 159]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 95]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 12.0ms | ActiveRecord: 3.4ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 159]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 93], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 93], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 93], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 162]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 162]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 162], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/162/payments/new" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"162"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "162"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 93]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 162]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 96]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.5ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/162/payments" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"162"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "162"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 162]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 93]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 162], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 162]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 96]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 96], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["payment_id", 53], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/162/payments Completed 302 Found in 17ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/162/payments" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"162"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "162"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 162]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 96]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 162]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 162]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.8ms | ActiveRecord: 3.6ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 162]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 163]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 163]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 163], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 164]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 164]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 164], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/53/reglements/new" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"53"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "53"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 162]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 163]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 97]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 164]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 98]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (17.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 21.5ms | ActiveRecord: 5.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 94) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 94) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 94], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 94) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 94) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 94], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 94) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 94) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 94], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 165]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 165]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 165], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/165/payments/new" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"165"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "165"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 94]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 165]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 99]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.7ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/165/payments" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"165"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "165"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 165]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 94]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 165], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 165]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 99]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 99], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["payment_id", 54], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/165/payments Completed 302 Found in 15ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/165/payments" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"165"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "165"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 165]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 99]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 165]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 165]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.7ms | ActiveRecord: 3.6ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 165]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 166]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 166]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 166], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 167]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 167]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 167], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/54/reglements/new" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"54"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "54"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 165]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 167]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 101]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 166]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 100]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 17.5ms | ActiveRecord: 5.2ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 95], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 95], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 95], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 168]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 168]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 168], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/168/payments/new" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"168"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "168"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 95]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 168]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 102]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.6ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/168/payments" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"168"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "168"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 168]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 95]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 168], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 168]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 102]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 102], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["payment_id", 55], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/168/payments Completed 302 Found in 17ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/168/payments" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"168"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "168"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 168]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 55]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 102]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 168]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 55]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 55]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 55]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 55]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 168]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.8ms | ActiveRecord: 3.7ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 168]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 169]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 169]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 169], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 170]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 170]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 170], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/55/reglements/new" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"55"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "55"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 168]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 55]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 55]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 55]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 55]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 170]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 104]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 169]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 103]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.8ms | ActiveRecord: 5.1ms) Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 168]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 168]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 55]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 55]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 96], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 96], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 96], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 171]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 171]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 171], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/171/payments/new" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"171"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "171"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 96]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 171]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 105]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.7ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/171/payments" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"171"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "171"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 171]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 96]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 171], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 171]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 105]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 105], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["payment_id", 56], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/171/payments Completed 302 Found in 15ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/171/payments" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"171"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "171"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 171]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 56]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 105]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 171]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 56]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 56]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 56]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 56]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 171]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.3ms | ActiveRecord: 3.6ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 171]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 172]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 172]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 172], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 173]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 173]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 173], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/56/reglements/new" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"56"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "56"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 171]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 56]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 56]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 56]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 56]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 172]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 106]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 173]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 107]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 17.3ms | ActiveRecord: 4.8ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 97], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 97], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 97], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 174]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 174]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 174], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/174/payments/new" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"174"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "174"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 97]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 174]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 108]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.7ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/174/payments" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"174"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "174"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 174]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 97]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 174], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 174]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 108]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 108], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["payment_id", 57], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/174/payments Completed 302 Found in 23ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/174/payments" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"174"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "174"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 174]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 108]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 174]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 174]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.4ms | ActiveRecord: 3.9ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 174]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 175]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 175]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 175], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 176]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 176]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 176], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/57/reglements/new" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"57"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "57"]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 174]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 176]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 110]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 109]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.9ms) Completed 200 OK in 26ms (Views: 15.7ms | ActiveRecord: 5.2ms) Started POST "/adherent/payments/57/reglements" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"109"}, "commit"=>"Enregistrer", "payment_id"=>"57"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "57"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "109"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 109]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 109], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00], ["payment_id", 57], ["updated_at", Tue, 14 Apr 2015 18:21:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 174]] Redirected to http://www.example.com/adherent/members/174/payments Completed 302 Found in 12ms (ActiveRecord: 4.2ms) Started GET "/adherent/members/174/payments" for 127.0.0.1 at 2015-04-14 20:21:35 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"174"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "174"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 174]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 108]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 174]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 109]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 174]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.8ms | ActiveRecord: 4.5ms) Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 108]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 174]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 98], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 98], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 98], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 177]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 177]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 177], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/177/payments/new" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"177"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "177"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 98]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 177]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 111]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.2ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/177/payments" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"177"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "177"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 177]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 98]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 177], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 177]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 111]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 111], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["payment_id", 58], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/177/payments Completed 302 Found in 16ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/177/payments" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"177"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "177"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 177]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 58]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 111]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 177]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 58]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 58]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 58]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 58]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 177]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.6ms | ActiveRecord: 3.6ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 177]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 178]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 178]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 178], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 179]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 179]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 179], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/58/reglements/new" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"58"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "58"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 177]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 58]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 58]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 58]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 58]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 112]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 179]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 113]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.8ms | ActiveRecord: 5.0ms) Started POST "/adherent/payments/58/reglements" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"112"}, "commit"=>"Enregistrer", "payment_id"=>"58"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "58"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "112"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 58]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 58]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 112]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 112], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["payment_id", 58], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 177]] Redirected to http://www.example.com/adherent/members/177/payments Completed 302 Found in 14ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/177/payments" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"177"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "177"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 177]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 58]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 111]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 177]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 112]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 58]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 58]] Adherent::Reglement Load (0.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 58]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 58]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 177]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.1ms | ActiveRecord: 4.7ms) Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 178]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 112]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 99], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 99], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 99], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 180]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 180]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 180], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/180/payments/new" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"180"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "180"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 99]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 180]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 114]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.8ms | ActiveRecord: 2.0ms) Started POST "/adherent/members/180/payments" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"180"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "180"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 180]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 99]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 180], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 180]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 114]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 114], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["payment_id", 59], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/180/payments Completed 302 Found in 16ms (ActiveRecord: 4.1ms) Started GET "/adherent/members/180/payments" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"180"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "180"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 180]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 59]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 114]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 180]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 59]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 59]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 59]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 59]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 180]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.8ms | ActiveRecord: 3.8ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 180]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 181]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 181]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 181], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 182]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 182]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 182], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/59/reglements/new" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"59"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "59"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 180]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 59]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 59]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 59]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 59]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 182]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 116]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 115]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 16.3ms | ActiveRecord: 5.0ms) Started POST "/adherent/payments/59/reglements" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"115"}, "commit"=>"Enregistrer", "payment_id"=>"59"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "59"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "115"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 59]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 59]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 115]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 115], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["payment_id", 59], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 180]] Redirected to http://www.example.com/adherent/members/180/payments Completed 302 Found in 12ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/180/payments" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"180"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "180"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 180]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 59]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 114]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 180]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 115]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 59]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 59]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 59]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 59]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 180]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.4ms | ActiveRecord: 4.4ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 100], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 100], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 100], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 183]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 183]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 183], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/183/payments/new" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"183"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "183"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 100]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 183]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 117]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.7ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/183/payments" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"183"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "183"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 183]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 100]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 183], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 183]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 117]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 117], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["payment_id", 60], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/183/payments Completed 302 Found in 15ms (ActiveRecord: 4.2ms) Started GET "/adherent/members/183/payments" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"183"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "183"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 183]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 60]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 117]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 183]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 60]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 60]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 60]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 60]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 183]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.9ms | ActiveRecord: 4.7ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 183]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 184]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 184]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 184], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 185]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 185]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 185], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/60/reglements/new" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"60"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "60"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 183]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 60]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 60]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 60]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 60]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 185]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 119]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 184]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 118]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 17.3ms | ActiveRecord: 5.0ms) Started POST "/adherent/payments/60/reglements" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"118"}, "commit"=>"Enregistrer", "payment_id"=>"60"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "60"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "118"]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 60]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 60]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 118]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 118], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["payment_id", 60], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 183]] Redirected to http://www.example.com/adherent/members/183/payments Completed 302 Found in 11ms (ActiveRecord: 3.9ms) Started GET "/adherent/members/183/payments" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"183"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "183"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 183]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 60]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 117]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 183]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 118]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 184]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 60]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 60]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 60]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 60]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 183]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.1ms | ActiveRecord: 5.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.9ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 101], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 101], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 101], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 186]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 186]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 186], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/186/payments/new" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"186"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "186"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 101]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 186]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 120]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (15.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 18.8ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/186/payments" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"186"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "186"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 186]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 101]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 186], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 186]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 120]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 120], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["payment_id", 61], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/186/payments Completed 302 Found in 16ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/186/payments" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"186"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "186"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 186]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 61]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 120]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 186]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 61]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 61]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 61]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 61]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 186]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.9ms | ActiveRecord: 3.9ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 186]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 187]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 187]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 187], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 188]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 188]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 188], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/61/reglements/new" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"61"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "61"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 186]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 61]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 61]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 61]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 61]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 188]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 122]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 187]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 121]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.4ms | ActiveRecord: 5.1ms) Started POST "/adherent/payments/61/reglements" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"121"}, "commit"=>"Enregistrer", "payment_id"=>"61"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "61"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "121"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 61]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 61]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 121]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 121], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["payment_id", 61], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 186]] Redirected to http://www.example.com/adherent/members/186/payments Completed 302 Found in 11ms (ActiveRecord: 4.1ms) Started GET "/adherent/members/186/payments" for 127.0.0.1 at 2015-04-14 20:21:36 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"186"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "186"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 186]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 61]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 120]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 186]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 121]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 187]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 61]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 61]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 61]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 61]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 186]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.6ms | ActiveRecord: 4.4ms) Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 121]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 187]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x616c974 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x6146792 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x612a038 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x612a088%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 4ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.5ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 192]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 192]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 192], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 192]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 192]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 193]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 193]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 193], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 193]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 193]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 194]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 194]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 194], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 194]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 194]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 SQL (50.1ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["member_id", 195], ["updated_at", Tue, 14 Apr 2015 18:21:36 UTC +00:00], ["zip", 59000]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 195]]  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 16]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 195]] SQL (0.5ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 195]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e7a5ea @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.7ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e61d2e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e374b6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e08bc0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5e08bc0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5dcfe38 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5dcfe38%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d9d820 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5d6e502 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.7ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5d4141c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.5ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5d18904 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ceb88c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5ceb88c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 4ms (ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x5cb3e8c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 4.9ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (2.6ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"14/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5c8c1ac @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"14/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5c56b06 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5c56b06%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"14/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5c3303e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5c3303e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5c132e8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5bf6c1a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.8ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5bdf3ee @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5bc5fac @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x5bc4fbc @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.7ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ba4816 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.4ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x586f740 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x583854c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x57ec836 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x57ec836%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x57a23a8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x57a23a8%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x576b0ba @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x57292be @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.8ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x56ec95e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.8ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x56c408a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x56c408a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5696d10 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"14/04/2016", "from_date"=>"14/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x566c484 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"14/04/2016", "from_date"=>"14/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5608f74 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5608f74%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"14/04/2016", "from_date"=>"14/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x55a90ba @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x55a90ba%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 136) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 136], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/196/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.5ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 138) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 138], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/197/coord/new Completed 302 Found in 9ms (ActiveRecord: 3.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 139) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 139], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/198/coord/new Completed 302 Found in 11ms (ActiveRecord: 4.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x4c881e8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 4ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x4c43228 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 4ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"199"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.8ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"200"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 200 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 200 [["name", "Dalton"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/200 Completed 302 Found in 12ms (ActiveRecord: 3.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"201"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/201 Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"202"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/202 Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.5ms | ActiveRecord: 1.4ms)  (1.0ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 149;  Completed 500 Internal Server Error in 6ms  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 150; Completed 200 OK in 7ms (Views: 2.0ms | ActiveRecord: 2.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as XLS Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 151;  Completed 500 Internal Server Error in 5ms  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 203]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 203 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 203], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (35.2ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 204]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 204 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 204], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 205]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 205 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 205], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 205 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 205], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 205], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 206]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 206 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 206], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 206 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 206], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 206], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 207]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 207 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 207], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 207 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 207], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 207], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 208]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 208 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 208], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 208 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 208], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 208], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 209]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 209 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 209], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 209 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 209], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 209], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 209], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 209]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 209]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 134]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 134], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["payment_id", 62], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 209], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 209]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 209]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 134]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 134], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["payment_id", 63], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 135]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 135], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["payment_id", 63], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 209], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 209]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 209]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 135]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 135], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["payment_id", 64], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (1.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 210]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 210 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 210], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 210 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 210], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 210], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 210], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 210]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 210]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 136]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 136], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["payment_id", 65], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (2.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 210], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 210]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 210]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 136]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 136], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["payment_id", 66], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 137]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 137], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["payment_id", 66], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.8ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 211]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 211 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 211], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 211 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 211], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 211], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 211], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 211]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 211]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 138]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 138], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["payment_id", 67], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 212]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 212 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 212], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 212 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 212], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]] SQL (1.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 212], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 212], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 212]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 212]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 140]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 140], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["payment_id", 68], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 212], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 212]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 212]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 140]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 140], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["payment_id", 69], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 141]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 141], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["payment_id", 69], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (1.8ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 109ms (Views: 4.0ms | ActiveRecord: 1.6ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 155) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 155) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 155], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/213/coord/new" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"213"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "213"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 213]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (19.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 23.7ms | ActiveRecord: 1.4ms) Started POST "/adherent/members/213/coord" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"213"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "213"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 213]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 213], ["office", ""], ["tel", ""], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/213/adhesions/new Completed 302 Found in 8ms (ActiveRecord: 2.7ms) Started GET "/adherent/members/213/adhesions/new" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"213"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "213"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 213]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 213]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.2ms | ActiveRecord: 1.7ms) Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 213]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 156) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 156) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 156], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/214/coord/new" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"214"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "214"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 214]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 20.5ms | ActiveRecord: 1.5ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/214/coord" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"214"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "214"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 214]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 214], ["office", ""], ["tel", ""], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/214/adhesions/new Completed 302 Found in 8ms (ActiveRecord: 2.2ms) Started GET "/adherent/members/214/adhesions/new" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"214"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "214"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 214]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 214]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 11.3ms | ActiveRecord: 1.5ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 157) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 157) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 157], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/215/coord/new" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"215"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "215"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 215]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 21.9ms | ActiveRecord: 1.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 158) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 158) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 158], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/216/coord/new" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"216"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "216"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 216]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 21.0ms | ActiveRecord: 1.5ms) Started POST "/adherent/members/216/coord" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"216"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "216"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 216]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 216], ["office", ""], ["tel", ""], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/216/adhesions/new Completed 302 Found in 8ms (ActiveRecord: 2.4ms) Started GET "/adherent/members/216/adhesions/new" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"216"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "216"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 216]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 216]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (15.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 18.5ms | ActiveRecord: 1.5ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 159) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 159) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 159], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 217]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 217]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 217], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/217/payments/new" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"217"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "217"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 159]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 217]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.2ms | ActiveRecord: 2.3ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 160) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 160) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 160], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 218]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 218]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 218], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/218/payments/new" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"218"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "218"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 160]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 218]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.5ms | ActiveRecord: 1.7ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 161) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 161) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 161], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 219]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 219]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 219], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 219]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 161]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 219], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 219]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/219/payments" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"219"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "219"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 219]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 70]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 70]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 70]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 70]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 70]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 219]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (7.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 8.9ms | ActiveRecord: 3.3ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 162) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 162) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 162], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 220]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 220]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 220], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 220]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 162]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 220], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 220]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/220/payments" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"220"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "220"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 220]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 71]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 71]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 71]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 71]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 71]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 220]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 9.6ms | ActiveRecord: 3.0ms) Started GET "/adherent/payments/71/reglements/new" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"71"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "71"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 220]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 71]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 71]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 71]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 71]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (7.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 10.9ms | ActiveRecord: 3.3ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 163) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 163) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 163], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 221]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 221]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 221], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/221/payments/new" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"221"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "221"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 163]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 221]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.3ms | ActiveRecord: 2.8ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 164) LIMIT 1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 164) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 164], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 222]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 222]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 222], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/222/payments/new" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"222"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "222"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 164]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 222]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.8ms | ActiveRecord: 1.8ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 222]] Started POST "/adherent/members/222/payments" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"222"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "222"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 222]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 164]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 222], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 222]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/222/payments Completed 302 Found in 13ms (ActiveRecord: 3.5ms) Started GET "/adherent/members/222/payments" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"222"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "222"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 222]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 72]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 72]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 72]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 72]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 72]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 222]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 9.3ms | ActiveRecord: 3.6ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 222]] SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 165) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 165) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 165], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 223]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 223]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 223], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 223]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 165]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 223], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 223]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/223/payments/73" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"223", "id"=>"73"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "223"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 73 LIMIT 1 [["member_id", 223]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 73]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 73]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 223]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 73]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 73]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 73]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (23.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 45ms (Views: 38.7ms | ActiveRecord: 3.9ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 166) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 166) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 166], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 224]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 224]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 224], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 224]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 166]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 224], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]] Adherent::Adhesion Load (0.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 224]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/224/payments/74" for 127.0.0.1 at 2015-04-14 20:21:38 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"224", "id"=>"74"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "224"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 74 LIMIT 1 [["member_id", 224]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 74]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 74]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 224]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 74]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 74]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 74]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.1ms | ActiveRecord: 4.2ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:38 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 167) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 167) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 167], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 225]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 225]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 225], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 225]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 167]] SQL (0.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 225], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 225]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/225/payments/75" for 127.0.0.1 at 2015-04-14 20:21:39 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"225", "id"=>"75"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "225"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 75 LIMIT 1 [["member_id", 225]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 75]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 75]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 225]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 75]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 75]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 75]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.1ms | ActiveRecord: 3.6ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 168) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 168) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 168], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/226/adhesions/new" for 127.0.0.1 at 2015-04-14 20:21:39 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"226"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "226"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 226]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 226]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.9ms | ActiveRecord: 2.0ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 169) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 169) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 169], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/227/adhesions/new" for 127.0.0.1 at 2015-04-14 20:21:39 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"227"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "227"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 227]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 227]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 9.8ms | ActiveRecord: 2.7ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 227]] Started POST "/adherent/members/227/adhesions" for 127.0.0.1 at 2015-04-14 20:21:39 +0200 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"227"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "227"]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 227], ["to_date", Thu, 31 Jul 2014], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/227/adhesions Completed 302 Found in 8ms (ActiveRecord: 2.3ms) Started GET "/adherent/members/227/adhesions" for 127.0.0.1 at 2015-04-14 20:21:39 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"227"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "227"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 227]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 227]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 151]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 151]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.2ms | ActiveRecord: 2.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 227]] SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 170) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 170) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 170], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 228], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/228/adhesions" for 127.0.0.1 at 2015-04-14 20:21:39 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"228"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "228"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 228]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 228]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 152]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 152]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 7.4ms | ActiveRecord: 2.5ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 171) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 171) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 171], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 229], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/229/adhesions" for 127.0.0.1 at 2015-04-14 20:21:39 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"229"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "229"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 229]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 229]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 153]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 153]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 7.6ms | ActiveRecord: 3.1ms) Started GET "/adherent/members/229/adhesions/153/edit" for 127.0.0.1 at 2015-04-14 20:21:39 +0200 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"229", "id"=>"153"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "229"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 229], ["id", "153"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 12.2ms | ActiveRecord: 1.8ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 172) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 172) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 172], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 230], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/230/adhesions" for 127.0.0.1 at 2015-04-14 20:21:39 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"230"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "230"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 230]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 230]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 154]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 154]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 7.7ms | ActiveRecord: 2.2ms) Started GET "/adherent/members/230/payments/new" for 127.0.0.1 at 2015-04-14 20:21:39 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"230"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "230"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 172]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 230]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 154]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.4ms | ActiveRecord: 2.3ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) BEGIN SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 173) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 173) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 173], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 173) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 173) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 173], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (2.1ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 173) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 173) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 173], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 173) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 173) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 173], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 173) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 173) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 173], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.5ms) BEGIN Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 231]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 173]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 231], ["mode", "Chèque"], ["updated_at", Tue, 14 Apr 2015 18:21:39 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 231]]  (1.3ms) COMMIT Started GET "/adherent/members/231/payments/76" for 127.0.0.1 at 2015-04-14 20:21:43 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"231", "id"=>"76"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "231"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 76 LIMIT 1 [["member_id", 231]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 76]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 76]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 231]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 76]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 76]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 76]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 36ms (Views: 16.0ms | ActiveRecord: 13.3ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-04-14 20:21:43 +0200 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-04-14 20:21:43 +0200 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-04-14 20:21:44 +0200 Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-04-14 20:21:44 +0200 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-04-14 20:21:44 +0200 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-04-14 20:21:44 +0200 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-04-14 20:21:44 +0200 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-04-14 20:21:44 +0200 Started DELETE "/adherent/members/231/payments/76" for 127.0.0.1 at 2015-04-14 20:21:45 +0200 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"231", "id"=>"76"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "231"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 231], ["id", "76"]]  (0.1ms) BEGIN Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 76]] SQL (0.5ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 76]]  (44.5ms) COMMIT Redirected to http://127.0.0.1:41462/adherent/members/231/payments Completed 302 Found in 57ms (ActiveRecord: 48.2ms) Started GET "/adherent/members/231/payments" for 127.0.0.1 at 2015-04-14 20:21:45 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"231"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "231"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 231]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 5.6ms | ActiveRecord: 11.3ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-04-14 20:21:45 +0200  (1.4ms) SELECT COUNT(*) FROM "adherent_payments"  (16.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (59.7ms) select table_name from information_schema.views where table_schema = 'adh_test'  (125.8ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_reglements", "organisms", "adherent_payments" RESTART IDENTITY CASCADE;  (0.5ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:46 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:46 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:46 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:46 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:46 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:46 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.3ms) BEGIN SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:46 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 1], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:46 UTC +00:00]]  (1.4ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-04-14 20:21:46 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 9.9ms | ActiveRecord: 5.7ms) Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-04-14 20:21:47 +0200 Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2015-04-14 20:21:47 +0200 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (4.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (142.3ms) COMMIT Redirected to http://127.0.0.1:41462/adherent/members/1/adhesions Completed 302 Found in 171ms (ActiveRecord: 151.1ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-04-14 20:21:47 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:41462/adherent/members/1/adhesions/new Completed 302 Found in 12ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2015-04-14 20:21:48 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 15.9ms | ActiveRecord: 10.6ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-04-14 20:21:48 +0200  (2.7ms) SELECT COUNT(*) FROM "adherent_adhesions"  (2.2ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (6.1ms) select table_name from information_schema.views where table_schema = 'adh_test'  (105.6ms) TRUNCATE TABLE "adherent_coords", "adherent_members", "adherent_adhesions", "organisms", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (1.0ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:49 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:49 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:49 UTC +00:00]]  (1.0ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:49 UTC +00:00]]  (1.0ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:49 UTC +00:00]]  (1.0ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:49 UTC +00:00]]  (1.0ms) COMMIT Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:21:49 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 67ms (Views: 61.5ms | ActiveRecord: 2.8ms) Started GET "/assets/adherent/icones/csv.png" for 127.0.0.1 at 2015-04-14 20:21:49 +0200 Started GET "/assets/adherent/icones/xls.png" for 127.0.0.1 at 2015-04-14 20:21:49 +0200 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-04-14 20:21:49 +0200 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-04-14 20:21:49 +0200 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-04-14 20:21:49 +0200 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-04-14 20:21:49 +0200 Started GET "/assets/back_disabled.png" for 127.0.0.1 at 2015-04-14 20:21:49 +0200 Started GET "/assets/forward_disabled.png" for 127.0.0.1 at 2015-04-14 20:21:49 +0200 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2015-04-14 20:21:50 +0200 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.2ms) BEGIN Adherent::Coord Load (1.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] SQL (0.4ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (75.5ms) COMMIT Redirected to http://127.0.0.1:41462/adherent/members Completed 302 Found in 87ms (ActiveRecord: 79.8ms) Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:21:50 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.9ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 15.4ms | ActiveRecord: 3.0ms)  (1.6ms) SELECT COUNT(*) FROM "adherent_members"  (2.4ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (4.4ms) select table_name from information_schema.views where table_schema = 'adh_test'  (112.7ms) TRUNCATE TABLE "adherent_coords", "adherent_members", "adherent_adhesions", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (2.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (3.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:21:51 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 16.4ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (1.0ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 2], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 2], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 2], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 2], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:21:51 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 2; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 14.3ms | ActiveRecord: 3.2ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 3], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 3], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 3], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 3], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:21:51 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.5ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 3; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 15.6ms | ActiveRecord: 2.0ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/11/payments" for 127.0.0.1 at 2015-04-14 20:21:51 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"11"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 11]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 8ms (Views: 3.8ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (1.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 4) LIMIT 1  (1.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 4], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 4], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 4], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 4], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:21:51 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 4; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 15.4ms | ActiveRecord: 2.1ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2015-04-14 20:21:51 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (12.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 17.2ms | ActiveRecord: 0.6ms)  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 5], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 5], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 5], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 5], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 5], ["updated_at", Tue, 14 Apr 2015 18:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:21:51 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 5;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 15.4ms | ActiveRecord: 2.2ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/21/adhesions" for 127.0.0.1 at 2015-04-14 20:21:52 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"21"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "21"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 21]] Redirected to http://www.example.com/adherent/members/21/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.7ms) Started GET "/adherent/members/21/adhesions/new" for 127.0.0.1 at 2015-04-14 20:21:52 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"21"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "21"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 21]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 17.3ms | ActiveRecord: 2.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.9ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 6], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 6], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 6], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 6], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 6], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:21:52 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 6;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 19.5ms | ActiveRecord: 1.6ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/26/edit" for 127.0.0.1 at 2015-04-14 20:21:52 +0200 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"26"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 16.1ms | ActiveRecord: 1.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 7], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 7], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 7], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 7], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 7], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:21:52 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 7; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 14.9ms | ActiveRecord: 2.0ms) Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["member_id", 31], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 31]] Started GET "/adherent/members/31/coord" for 127.0.0.1 at 2015-04-14 20:21:52 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"31"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 11ms (Views: 5.8ms | ActiveRecord: 2.0ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 8], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 8], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 8], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 8], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 8], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:21:52 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 8; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 16.5ms | ActiveRecord: 1.5ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/36/coord" for 127.0.0.1 at 2015-04-14 20:21:52 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"36"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 36]] Redirected to http://www.example.com/adherent/members/36/coord/new Completed 302 Found in 5ms (ActiveRecord: 1.4ms) Started GET "/adherent/members/36/coord/new" for 127.0.0.1 at 2015-04-14 20:21:52 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"36"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 36]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (22.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 25.9ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 9], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 9], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 9], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 9], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 9], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:21:52 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 9;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 14.8ms | ActiveRecord: 1.6ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 41]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 41]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 41], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/41/adhesions" for 127.0.0.1 at 2015-04-14 20:21:52 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"41"} Organism Load (2.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Adhesion Exists (1.0ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 41]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 41]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 25.5ms | ActiveRecord: 5.5ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 10], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 10], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 10], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 10], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 10], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2015-04-14 20:21:52 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 12.9ms | ActiveRecord: 0.6ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2015-04-14 20:21:52 +0200 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 10], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/51/coord/new Completed 302 Found in 8ms (ActiveRecord: 2.3ms) Started GET "/adherent/members/51/coord/new" for 127.0.0.1 at 2015-04-14 20:21:52 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"51"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "51"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 51]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 20.7ms | ActiveRecord: 2.9ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_members"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 11], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (2.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 52], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 52]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 52]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["from_date", Fri, 15 May 2015], ["member_id", 52], ["to_date", Sat, 14 May 2016], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 52]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 11]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 52], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 52]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] SQL (1.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 2], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["payment_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 3], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["payment_id", 1], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 12], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 53], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 53]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 53]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["from_date", Fri, 15 May 2015], ["member_id", 53], ["to_date", Sat, 14 May 2016], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 53]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 12]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 13], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 54], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 54]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 54]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["from_date", Fri, 15 May 2015], ["member_id", 54], ["to_date", Sat, 14 May 2016], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 54]] Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 13]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 54], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 54]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 6], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["payment_id", 2], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 55], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 55]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 55]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["from_date", Fri, 15 May 2015], ["member_id", 55], ["to_date", Sat, 14 May 2016], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 55]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 14]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 55], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 55]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 8], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["payment_id", 3], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 9], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["payment_id", 3], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 56], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 56]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 56]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00], ["from_date", Fri, 15 May 2015], ["member_id", 56], ["to_date", Sat, 14 May 2016], ["updated_at", Tue, 14 Apr 2015 18:21:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 56]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 15]]  (0.4ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5457e5a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (4.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 26ms (ActiveRecord: 8.8ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5b4f08c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (3.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 18; Completed 200 OK in 36ms (Views: 11.1ms | ActiveRecord: 5.1ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 19;  Adherent::QueryMember Load (0.8ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 19; Sent data Mon association-14-avr-2015-Membres.csv (50.0ms) Completed 200 OK in 75ms (Views: 49.7ms | ActiveRecord: 4.0ms)  (0.8ms) ROLLBACK  (1.0ms) BEGIN  (1.2ms) ROLLBACK  (1.0ms) BEGIN Processing by Adherent::MembersController#index as XLS Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 20;  Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 20; Sent data Mon association-14-avr-2015-Membres.xls (0.6ms) Completed 200 OK in 13ms (Views: 0.4ms | ActiveRecord: 6.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 21], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/57/coord/new Completed 302 Found in 38ms (ActiveRecord: 3.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 22], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/58/coord/new Completed 302 Found in 12ms (ActiveRecord: 3.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.4ms | ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 24], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/59/coord/new Completed 302 Found in 12ms (ActiveRecord: 4.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (2.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.3ms | ActiveRecord: 3.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (1.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 2.9ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"60"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/60 Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"61"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.5ms | ActiveRecord: 1.3ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"62"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 62 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 62 [["name", "Dalton"], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/62 Completed 302 Found in 11ms (ActiveRecord: 3.6ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"63"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/63 Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.6ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:36:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"64"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/edit.html.erb within layouts/adherent/application (0.3ms) Completed 200 OK in 28ms (Views: 8.1ms | ActiveRecord: 5.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"65"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/65 Completed 302 Found in 5ms (ActiveRecord: 1.3ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"66"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 66 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 66 [["name", "Dalton"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/66 Completed 302 Found in 11ms (ActiveRecord: 3.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"67"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/67 Completed 302 Found in 5ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 40; Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 40;  Sent data Mon association-14-avr-2015-Membres.csv (1.6ms) Completed 200 OK in 40ms (Views: 1.5ms | ActiveRecord: 4.9ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 41; Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 42;  Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 2.9ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as XLS Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.9ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 43; Adherent::QueryMember Load (0.9ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 43;  Sent data Mon association-14-avr-2015-Membres.xls (0.4ms) Completed 200 OK in 7ms (Views: 0.2ms | ActiveRecord: 3.3ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 44], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/68/coord/new Completed 302 Found in 21ms (ActiveRecord: 3.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 45) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 45], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/69/coord/new Completed 302 Found in 9ms (ActiveRecord: 3.1ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 47], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/70/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.1ms)  (0.1ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x68985a4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x68adf80 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.7ms)  (1.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:37:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (5.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/show.html.erb within layouts/adherent/application (0.3ms) Completed 200 OK in 38ms (Views: 7.6ms | ActiveRecord: 13.7ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.0ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 29ms (Views: 1.5ms | ActiveRecord: 4.2ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 58], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/71/coord/new Completed 302 Found in 16ms (ActiveRecord: 4.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 59], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/72/coord/new Completed 302 Found in 24ms (ActiveRecord: 3.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 60], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/73/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.8ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"74"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 74 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 74 [["name", "Dalton"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/74 Completed 302 Found in 11ms (ActiveRecord: 3.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"75"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"76"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/76 Completed 302 Found in 4ms (ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"77"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/77 Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x4c860be @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 4ms (ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5df2c62 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 500 Internal Server Error in 6ms  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.9ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 69; Adherent::QueryMember Load (1.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 69;  Sent data Mon association-14-avr-2015-Membres.csv (1.4ms) Completed 200 OK in 9ms (Views: 1.3ms | ActiveRecord: 4.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as XLS Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 70; Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 70;  Sent data Mon association-14-avr-2015-Membres.xls (0.4ms) Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 3.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 71; Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (4.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/edit.html.erb within layouts/adherent/application (0.3ms) Completed 200 OK in 38ms (Views: 7.5ms | ActiveRecord: 14.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5bdef02 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 4ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x62c42d6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 4ms (ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.6ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as XLS Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 78; Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 78;  Sent data Mon association-14-avr-2015-Membres.xls (1.5ms) Completed 200 OK in 39ms (Views: 1.3ms | ActiveRecord: 5.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 79; Adherent::QueryMember Load (1.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 79;  Sent data Mon association-14-avr-2015-Membres.csv (0.4ms) Completed 200 OK in 8ms (Views: 0.2ms | ActiveRecord: 3.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 500 Internal Server Error in 5ms  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 81; Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 2.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 24ms (Views: 1.6ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"78"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/78 Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"79"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"80"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 80 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 80 [["name", "Dalton"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/80 Completed 302 Found in 10ms (ActiveRecord: 3.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"81"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/81 Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 87], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/82/coord/new Completed 302 Found in 9ms (ActiveRecord: 3.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 88], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/83/coord/new Completed 302 Found in 9ms (ActiveRecord: 3.1ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.9ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (2.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 90) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 90], ["updated_at", Tue, 14 Apr 2015 18:39:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/84/coord/new Completed 302 Found in 11ms (ActiveRecord: 5.4ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (4.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/show.html.erb within layouts/adherent/application (0.4ms) Completed 200 OK in 38ms (Views: 7.4ms | ActiveRecord: 13.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5082a8c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5da82c0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 4ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 95; Completed 200 OK in 22ms (Views: 1.7ms | ActiveRecord: 4.1ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 96;  Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 96; Sent data Mon association-14-avr-2015-Membres.csv (1.0ms) Completed 200 OK in 23ms (Views: 0.8ms | ActiveRecord: 4.8ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as XLS Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 98;  Adherent::QueryMember Load (0.8ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 98; Sent data Mon association-14-avr-2015-Membres.xls (0.4ms) Completed 200 OK in 7ms (Views: 0.2ms | ActiveRecord: 3.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 99], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/85/coord/new Completed 302 Found in 36ms (ActiveRecord: 3.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 100], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/86/coord/new Completed 302 Found in 9ms (ActiveRecord: 2.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 102], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/87/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.2ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"88"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/88 Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"89"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.7ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"90"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 90 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 90 [["name", "Dalton"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/90 Completed 302 Found in 10ms (ActiveRecord: 3.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"91"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/91 Completed 302 Found in 5ms (ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN SQL (1.0ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (4.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 110) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 110) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 110], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 92], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/92/adhesions" for 127.0.0.1 at 2015-04-14 20:41:57 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"92"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "92"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 92]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 92]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (23.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.9ms) Completed 200 OK in 66ms (Views: 54.9ms | ActiveRecord: 6.3ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 111) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 111) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 111], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 93], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/93/adhesions" for 127.0.0.1 at 2015-04-14 20:41:57 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"93"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 93]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 93]]  (1.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 12ms (Views: 6.5ms | ActiveRecord: 3.4ms) Started GET "/adherent/members/93/payments/new" for 127.0.0.1 at 2015-04-14 20:41:57 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"93"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 111]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 93]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (39.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 71ms (Views: 46.1ms | ActiveRecord: 6.7ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 112) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 112) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 112], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 94], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/94/adhesions" for 127.0.0.1 at 2015-04-14 20:41:57 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"94"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "94"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 94]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 94]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 7.1ms | ActiveRecord: 2.5ms) Started GET "/adherent/members/94/adhesions/14/edit" for 127.0.0.1 at 2015-04-14 20:41:57 +0200 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"94", "id"=>"14"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "94"]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 94], ["id", "14"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (11.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 15.7ms | ActiveRecord: 2.1ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 113) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 113) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 113], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/95/adhesions/new" for 127.0.0.1 at 2015-04-14 20:41:57 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"95"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "95"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 95]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 95]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.2ms | ActiveRecord: 2.0ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 95]] Started POST "/adherent/members/95/adhesions" for 127.0.0.1 at 2015-04-14 20:41:57 +0200 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"95"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "95"]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 95], ["to_date", Thu, 31 Jul 2014], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/95/adhesions Completed 302 Found in 8ms (ActiveRecord: 2.2ms) Started GET "/adherent/members/95/adhesions" for 127.0.0.1 at 2015-04-14 20:41:57 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"95"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "95"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 95]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 95]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 12ms (Views: 7.1ms | ActiveRecord: 2.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 95]] SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 114) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 114) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 114], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/96/adhesions/new" for 127.0.0.1 at 2015-04-14 20:41:57 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"96"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "96"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 96]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 96]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.9ms | ActiveRecord: 1.7ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 1], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 16], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["payment_id", 1], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 1], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 17], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["payment_id", 1], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 1], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 18], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["payment_id", 1], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]]  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 115) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 115) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 115], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 115) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 115) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 115], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 97], ["to_date", Sat, 31 Aug 2013], ["updated_at", Tue, 14 Apr 2015 18:41:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 98], ["to_date", Sat, 31 Aug 2013], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 98]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 115]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 98], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 98]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 20], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["payment_id", 4], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 98]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 115]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 98], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 98]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 20], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["payment_id", 5], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 97]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 115]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 97], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 97]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 19], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["payment_id", 6], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 116) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 116) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 116], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 116) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 116) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 116], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 99], ["to_date", Sat, 31 Aug 2013], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 100], ["to_date", Sat, 31 Aug 2013], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 100]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 116]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 100], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 100]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 22], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["payment_id", 7], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 99]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 116]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 99], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 99]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 21], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["payment_id", 8], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 117) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 117) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 117], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 117) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 117) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 117], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 101], ["to_date", Sat, 31 Aug 2013], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 102], ["to_date", Sat, 31 Aug 2013], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 102]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 117]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 102], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 102]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 24], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["payment_id", 9], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x4dd41c8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x4e20c8a @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"14/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x56a8c5e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"14/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5735c9e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5735c9e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"14/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x57d9132 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x57d9132%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x582ac44 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x58a390a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.0ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x58f285c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (2.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 103]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 103 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 103], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 104]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 104 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 104], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 105]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 105 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 105], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 105 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 105], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 105], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 106]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 106 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 106], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 106 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 106], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 106], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 107]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 107 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 107], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 107 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 107], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 107], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 108]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 108 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 108], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 108 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 108], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 108], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 109]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 109 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 109], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 109 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 109], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 109], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 109], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 109]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 109]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 33], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["payment_id", 10], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.9ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 109], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 109]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 109]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 33], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["payment_id", 11], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 34], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["payment_id", 11], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 110]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 110 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 110], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 110 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 110], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 110], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 110], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 110]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 110]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 35], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["payment_id", 12], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 110], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 110]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 110]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 35], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["payment_id", 13], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] SQL (1.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 36], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["payment_id", 13], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 110], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 110]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 110]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 36], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["payment_id", 14], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 111]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 111 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 111], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 111 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 111], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 111], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 111], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 111]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 111]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 37], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["payment_id", 15], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 111], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 111]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 111]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 37], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["payment_id", 16], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 38], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["payment_id", 16], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 112]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 112 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 112], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 112 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 112], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 112], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 112], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 112]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 112]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 39], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["payment_id", 17], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x644d81e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x634ecf6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x6320b58 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6320b58%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x624e040 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x624e040%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x60562ce @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x646f3c4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x645443e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"14/04/2016", "from_date"=>"14/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x642f97c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.9ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"14/04/2016", "from_date"=>"14/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x64006ae @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x64006ae%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"14/04/2016", "from_date"=>"14/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x63d6246 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x63d6246%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x63ace00 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x639463e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x639463e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6378fc4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6359d86 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.5ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6305c54 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x62df13a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x62df13a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x62c02d0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x62c02d0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 5ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x629f4fe @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6276414 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6257528 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.7ms | ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x6233eca @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x61df1c2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x61df1c2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6169d78 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x614c278 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["member_id", 113], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["zip", 59000]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 113]]  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 12]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 113]] SQL (0.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 113]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:41:58 UTC +00:00]]  (115.1ms) COMMIT Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 149) LIMIT 1  (0.9ms) BEGIN Adherent::Member Exists (1.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 149) LIMIT 1 SQL (2.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 149], ["updated_at", Tue, 14 Apr 2015 18:41:59 UTC +00:00]]  (3.4ms) COMMIT Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 149) LIMIT 1  (1.2ms) BEGIN Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 149) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 149], ["updated_at", Tue, 14 Apr 2015 18:41:59 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 149) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 149) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 149], ["updated_at", Tue, 14 Apr 2015 18:41:59 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 149) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 149) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 149], ["updated_at", Tue, 14 Apr 2015 18:41:59 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 149) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 149) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:41:59 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 149], ["updated_at", Tue, 14 Apr 2015 18:41:59 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) BEGIN Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 114]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 149]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:41:59 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 114], ["mode", "Chèque"], ["updated_at", Tue, 14 Apr 2015 18:41:59 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 114]]  (1.3ms) COMMIT Started GET "/adherent/members/114/payments/18" for 127.0.0.1 at 2015-04-14 20:42:02 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"114", "id"=>"18"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 18 LIMIT 1 [["member_id", 114]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 114]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 49ms (Views: 27.9ms | ActiveRecord: 14.2ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-04-14 20:42:02 +0200 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-04-14 20:42:02 +0200 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-04-14 20:42:03 +0200 Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-04-14 20:42:03 +0200 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-04-14 20:42:03 +0200 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-04-14 20:42:03 +0200 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-04-14 20:42:03 +0200 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-04-14 20:42:03 +0200 Started DELETE "/adherent/members/114/payments/18" for 127.0.0.1 at 2015-04-14 20:42:03 +0200 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"114", "id"=>"18"} Organism Load (5.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 114], ["id", "18"]]  (0.1ms) BEGIN Adherent::Reglement Load (1.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] SQL (10.1ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 18]]  (246.5ms) COMMIT Redirected to http://127.0.0.1:49568/adherent/members/114/payments Completed 302 Found in 278ms (ActiveRecord: 265.6ms) Started GET "/adherent/members/114/payments" for 127.0.0.1 at 2015-04-14 20:42:04 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"114"} Organism Load (3.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 114]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 38ms (Views: 11.3ms | ActiveRecord: 21.5ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-04-14 20:42:04 +0200  (1.5ms) SELECT COUNT(*) FROM "adherent_payments"  (1.6ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (4.4ms) select table_name from information_schema.views where table_schema = 'adh_test'  (59.8ms) TRUNCATE TABLE "adherent_members", "adherent_adhesions", "adherent_coords", "adherent_reglements", "organisms", "adherent_payments" RESTART IDENTITY CASCADE;  (1.1ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL SQL (1.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:05 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:05 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:05 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:05 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:05 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:05 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.3ms) BEGIN SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:05 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 1], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:05 UTC +00:00]]  (1.7ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-04-14 20:42:05 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (1.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.3ms | ActiveRecord: 5.0ms) Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-04-14 20:42:05 +0200 Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2015-04-14 20:42:06 +0200 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (131.3ms) COMMIT Redirected to http://127.0.0.1:49568/adherent/members/1/adhesions Completed 302 Found in 139ms (ActiveRecord: 133.5ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-04-14 20:42:06 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:49568/adherent/members/1/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 2.2ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2015-04-14 20:42:06 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (11.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 16.3ms | ActiveRecord: 2.9ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-04-14 20:42:06 +0200  (1.8ms) SELECT COUNT(*) FROM "adherent_adhesions"  (1.9ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (2.5ms) select table_name from information_schema.views where table_schema = 'adh_test'  (129.5ms) TRUNCATE TABLE "adherent_members", "adherent_adhesions", "adherent_coords", "organisms", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (0.9ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:07 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:07 UTC +00:00]]  (3.9ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:07 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:07 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:07 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:07 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:07 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:42:07 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 25.5ms | ActiveRecord: 3.1ms) Started GET "/assets/adherent/icones/csv.png" for 127.0.0.1 at 2015-04-14 20:42:07 +0200 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-04-14 20:42:07 +0200 Started GET "/assets/adherent/icones/xls.png" for 127.0.0.1 at 2015-04-14 20:42:07 +0200 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-04-14 20:42:07 +0200 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-04-14 20:42:07 +0200 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-04-14 20:42:07 +0200 Started GET "/assets/forward_disabled.png" for 127.0.0.1 at 2015-04-14 20:42:07 +0200 Started GET "/assets/back_disabled.png" for 127.0.0.1 at 2015-04-14 20:42:07 +0200 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2015-04-14 20:42:08 +0200 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (5.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.1ms) BEGIN Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (2.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] SQL (0.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (104.8ms) COMMIT Redirected to http://127.0.0.1:49568/adherent/members Completed 302 Found in 124ms (ActiveRecord: 115.6ms) Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:42:08 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.1ms | ActiveRecord: 7.1ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_members"  (0.5ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (1.5ms) select table_name from information_schema.views where table_schema = 'adh_test'  (126.9ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x6345d86 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 30ms (ActiveRecord: 2.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x622b702 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (2.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 3], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/1/coord/new Completed 302 Found in 16ms (ActiveRecord: 7.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 4], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/2/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.8ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 6], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/3/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/4 Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"5"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.7ms | ActiveRecord: 1.9ms)  (1.0ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"6"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 6 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.9ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 6 [["name", "Dalton"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/6 Completed 302 Found in 10ms (ActiveRecord: 4.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"7"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/7 Completed 302 Found in 4ms (ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.7ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as XLS Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 16;  Adherent::QueryMember Load (0.9ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 16; Sent data Mon association-14-avr-2015-Membres.xls (1.5ms) Completed 200 OK in 8ms (Views: 1.3ms | ActiveRecord: 3.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 17;  Adherent::QueryMember Load (1.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 17; Sent data Mon association-14-avr-2015-Membres.csv (0.5ms) Completed 200 OK in 9ms (Views: 0.4ms | ActiveRecord: 4.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 19;  Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 2.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 8]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 8]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 8], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 20]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 8], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/8/payments/1" for 127.0.0.1 at 2015-04-14 20:42:10 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"8", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 8]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.4ms | ActiveRecord: 4.4ms) SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 9]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 9]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 9], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 9]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 21]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 9], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 9]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/9/payments/2" for 127.0.0.1 at 2015-04-14 20:42:10 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"9", "id"=>"2"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 2 LIMIT 1 [["member_id", 9]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 9]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 10.9ms | ActiveRecord: 4.4ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 10]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 10]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 10], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 10]] Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 10], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 10]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/10/payments/3" for 127.0.0.1 at 2015-04-14 20:42:10 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"10", "id"=>"3"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 3 LIMIT 1 [["member_id", 10]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 10]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 10.6ms | ActiveRecord: 5.7ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 11]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 11], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/11/payments/new" for 127.0.0.1 at 2015-04-14 20:42:10 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"11"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 14.7ms | ActiveRecord: 4.3ms) SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 12]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 12]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 12], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/12/payments/new" for 127.0.0.1 at 2015-04-14 20:42:10 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"12"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "12"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 24]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 12]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.5ms | ActiveRecord: 2.1ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 13]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 13]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 13], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 25]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 13], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 13]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/13/payments" for 127.0.0.1 at 2015-04-14 20:42:10 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"13"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 13]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.8ms | ActiveRecord: 4.1ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 14]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 14]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 14], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 26]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 14], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/14/payments" for 127.0.0.1 at 2015-04-14 20:42:10 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"14"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 14]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (7.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 9.9ms | ActiveRecord: 4.4ms) Started GET "/adherent/payments/5/reglements/new" for 127.0.0.1 at 2015-04-14 20:42:10 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"5"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 21.6ms | ActiveRecord: 3.6ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 27], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 15]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 15]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 15], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/15/payments/new" for 127.0.0.1 at 2015-04-14 20:42:10 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"15"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.2ms | ActiveRecord: 2.0ms)  (1.0ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 15]] Started POST "/adherent/members/15/payments" for 127.0.0.1 at 2015-04-14 20:42:10 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"15"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 27]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 15], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 15]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/15/payments Completed 302 Found in 15ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/15/payments" for 127.0.0.1 at 2015-04-14 20:42:10 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"15"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 15]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 9.8ms | ActiveRecord: 5.4ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 15]] SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 16]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 16]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 16], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/16/payments/new" for 127.0.0.1 at 2015-04-14 20:42:10 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"16"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.4ms | ActiveRecord: 2.2ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 29], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 29], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 29], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 29], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:42:10 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 29;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 19.7ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 30], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 30], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 30], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 30], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:42:10 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 30;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 16.9ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 31], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 31], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 31], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 31], ["updated_at", Tue, 14 Apr 2015 18:42:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2015-04-14 20:42:10 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 15.4ms | ActiveRecord: 0.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 31], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/32/coord/new Completed 302 Found in 9ms (ActiveRecord: 2.3ms) Started GET "/adherent/members/32/coord/new" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"32"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (21.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 25.6ms | ActiveRecord: 2.7ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 32], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 32], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 32], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 32], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 32], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 32; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 13.7ms | ActiveRecord: 1.9ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 12.8ms | ActiveRecord: 0.5ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 33], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 33], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 33], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 33], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 33;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 14.9ms | ActiveRecord: 1.7ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/38/payments" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"38"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 38]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 7ms (Views: 3.4ms | ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (1.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 34], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 34], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 34], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 34], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 34;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 14.4ms | ActiveRecord: 1.6ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/43/edit" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"43"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "43"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 14.1ms | ActiveRecord: 0.9ms)  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 35], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 35], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 35], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 35], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 35], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 35; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 13.4ms | ActiveRecord: 1.9ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["member_id", 48], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 48]] Started GET "/adherent/members/48/coord" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"48"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "48"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 48]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 9ms (Views: 5.0ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 36], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 36], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 36], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 36], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 36], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 36; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 14.8ms | ActiveRecord: 1.8ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/53/adhesions" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"53"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "53"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 53]] Redirected to http://www.example.com/adherent/members/53/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.5ms) Started GET "/adherent/members/53/adhesions/new" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"53"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "53"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 53]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 53]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.3ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 37], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 37], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 37], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 37], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 37], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 37; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 15.1ms | ActiveRecord: 1.6ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 58]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 58]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 58], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/58/adhesions" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"58"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "58"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 58]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 58]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 7.3ms | ActiveRecord: 3.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 38], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 38], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 38], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 38], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 38], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 38; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 14.1ms | ActiveRecord: 1.8ms) Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/63/coord" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"63"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "63"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 63]] Redirected to http://www.example.com/adherent/members/63/coord/new Completed 302 Found in 5ms (ActiveRecord: 1.6ms) Started GET "/adherent/members/63/coord/new" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"63"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "63"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 63]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 21.5ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 39], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/68/coord/new" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"68"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 68]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 21.2ms | ActiveRecord: 1.7ms) Started POST "/adherent/members/68/coord" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"68"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 68]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 68], ["office", ""], ["tel", ""], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/68/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 2.9ms) Started GET "/adherent/members/68/adhesions/new" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"68"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 68]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 68]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.0ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 40], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/69/coord/new" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"69"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "69"]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 69]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 20.8ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/69/coord" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"69"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "69"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 69]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 69], ["office", ""], ["tel", ""], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/69/adhesions/new Completed 302 Found in 8ms (ActiveRecord: 3.0ms) Started GET "/adherent/members/69/adhesions/new" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"69"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "69"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 69]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 69]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.8ms | ActiveRecord: 1.9ms) Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 69]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 41], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/70/coord/new" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"70"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 70]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 20.5ms | ActiveRecord: 1.7ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/70/coord" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"70"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 70]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 70], ["office", ""], ["tel", ""], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/70/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 3.1ms) Started GET "/adherent/members/70/adhesions/new" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"70"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 70]] Adherent::Adhesion Load (2.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 70]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.0ms | ActiveRecord: 5.2ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 42], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/71/coord/new" for 127.0.0.1 at 2015-04-14 20:42:11 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"71"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 71]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 22.1ms | ActiveRecord: 1.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 2.6ms | ActiveRecord: 1.8ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 72]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 72]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 72], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 72]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 72]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 73]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 73]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 73], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 73]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 73]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 74]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 74]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 74], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 74]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 74]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x5884b36 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5884b9a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5837674 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.5ms | ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x580e076 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 47], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 47], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 47], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 78]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 78]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 78], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/78/payments/new" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"78"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "78"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 47]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 78]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.6ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/78/payments" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"78"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "78"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 78]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 47]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 78], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 78]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 14], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["payment_id", 7], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/78/payments Completed 302 Found in 18ms (ActiveRecord: 5.7ms) Started GET "/adherent/members/78/payments" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"78"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "78"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 78]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 78]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 78]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 15.9ms | ActiveRecord: 5.0ms) Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 78]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 79]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 79]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 79], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 80]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 80]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 80], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/7/reglements/new" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"7"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 78]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 80]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 79]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 17.6ms | ActiveRecord: 5.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 48], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 48], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 48], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 81]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 81]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 81], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/81/payments/new" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"81"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "81"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 48]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 81]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.1ms | ActiveRecord: 3.6ms) Started POST "/adherent/members/81/payments" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"81"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "81"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 81]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 48]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 81], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 81]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 17], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["payment_id", 8], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/81/payments Completed 302 Found in 18ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/81/payments" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"81"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "81"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 81]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 81]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 81]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.0ms | ActiveRecord: 4.4ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 81]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 82]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 82]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 82], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 83]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 83]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 83], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/8/reglements/new" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"8"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 81]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 82]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 83]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.3ms | ActiveRecord: 5.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 49], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 49], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 49], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 84]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 84]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 84], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/84/payments/new" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"84"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "84"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 49]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 84]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.2ms | ActiveRecord: 3.9ms) Started POST "/adherent/members/84/payments" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"84"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "84"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 84]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 49]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 84], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 84]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 20], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["payment_id", 9], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/84/payments Completed 302 Found in 18ms (ActiveRecord: 6.1ms) Started GET "/adherent/members/84/payments" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"84"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "84"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 84]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 84]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 84]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.8ms | ActiveRecord: 4.8ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 84]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 85]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 85]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 85], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 86]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 86]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 86], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/9/reglements/new" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"9"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 84]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 86]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 85]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 16.6ms | ActiveRecord: 6.3ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 50], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 50], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 50], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 87]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 87]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 87], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/87/payments/new" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"87"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "87"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 50]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 87]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.4ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/87/payments" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"87"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "87"]]  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 87]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 50]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 87], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 87]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 23], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["payment_id", 10], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/87/payments Completed 302 Found in 18ms (ActiveRecord: 6.0ms) Started GET "/adherent/members/87/payments" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"87"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "87"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 87]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 87]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 87]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.6ms | ActiveRecord: 4.3ms) Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 87]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 88]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 88]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 88], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 89]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 89]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 89], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/10/reglements/new" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"10"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 87]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 89]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 88]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.4ms | ActiveRecord: 5.8ms) Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 87]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 87]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 51], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 51], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 51], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 90]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 90]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 90], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/90/payments/new" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"90"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "90"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 51]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 90]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.7ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/90/payments" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"90"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "90"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 90]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 51]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 90], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 90]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 26], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["payment_id", 11], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/90/payments Completed 302 Found in 18ms (ActiveRecord: 5.7ms) Started GET "/adherent/members/90/payments" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"90"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "90"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 90]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 90]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 90]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.7ms | ActiveRecord: 4.5ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 90]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 91]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 91]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 91], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 92]] Adherent::Adhesion Load (2.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 92]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 92], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/11/reglements/new" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"11"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 90]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 92]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 91]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 16.5ms | ActiveRecord: 6.0ms) Started POST "/adherent/payments/11/reglements" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"27"}, "commit"=>"Enregistrer", "payment_id"=>"11"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "27"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 27], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["payment_id", 11], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 90]] Redirected to http://www.example.com/adherent/members/90/payments Completed 302 Found in 12ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/90/payments" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"90"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "90"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 90]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 90]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 91]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 90]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.7ms | ActiveRecord: 5.9ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 91]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 52], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 52], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 52], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 93]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 93]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 93], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/93/payments/new" for 127.0.0.1 at 2015-04-14 20:42:12 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"93"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 52]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 93]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 12.2ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/93/payments" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"93"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 93]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 52]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 93], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 93]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 29], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["payment_id", 12], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/93/payments Completed 302 Found in 16ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/93/payments" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"93"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 93]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 93]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 93]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 20ms (Views: 13.3ms | ActiveRecord: 4.4ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 93]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 94]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 94]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 94], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 95]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 95]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 95], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/12/reglements/new" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"12"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 93]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 94]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 95]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.4ms | ActiveRecord: 5.2ms) Started POST "/adherent/payments/12/reglements" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"30"}, "commit"=>"Enregistrer", "payment_id"=>"12"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "30"]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 30], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["payment_id", 12], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 93]] Redirected to http://www.example.com/adherent/members/93/payments Completed 302 Found in 13ms (ActiveRecord: 4.1ms) Started GET "/adherent/members/93/payments" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"93"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "93"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 93]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 93]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 94]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 93]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 16.9ms | ActiveRecord: 4.8ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 93]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 53], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 53], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 53], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 96]] Adherent::Adhesion Load (2.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 96]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 96], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/96/payments/new" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"96"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "96"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 53]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 96]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.1ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/96/payments" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"96"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "96"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 96]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 53]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 96], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 96]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 32], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["payment_id", 13], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/96/payments Completed 302 Found in 18ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/96/payments" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"96"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "96"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 96]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 96]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 96]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.0ms | ActiveRecord: 4.2ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 96]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 96]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 96]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["from_date", Thu, 14 Apr 2016], ["member_id", 96], ["to_date", Thu, 13 Apr 2017], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 97]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 97]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 97], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/13/reglements/new" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"13"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 96]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 96]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 97]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 17.5ms | ActiveRecord: 4.7ms) Started POST "/adherent/payments/13/reglements" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"33"}, "commit"=>"Enregistrer", "payment_id"=>"13"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "33"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 33], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["payment_id", 13], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 96]] Redirected to http://www.example.com/adherent/members/96/payments Completed 302 Found in 12ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/96/payments" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"96"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "96"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 96]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 96]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 33]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 96]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 96]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 16.8ms | ActiveRecord: 4.7ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 54], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 54], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 54], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 99]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 99]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 99], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/99/payments/new" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"99"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "99"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 54]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 99]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.1ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/99/payments" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"99"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "99"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 99]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 54]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 99], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 99]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 35], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["payment_id", 14], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/99/payments Completed 302 Found in 16ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/99/payments" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"99"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "99"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 99]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 99]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 99]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.6ms | ActiveRecord: 4.1ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 99]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 100]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 100]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 100], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 101]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 101]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 101], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/14/reglements/new" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"14"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 99]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 100]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 101]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 15.5ms | ActiveRecord: 5.2ms) Started POST "/adherent/payments/14/reglements" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"36"}, "commit"=>"Enregistrer", "payment_id"=>"14"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 36], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["payment_id", 14], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 99]] Redirected to http://www.example.com/adherent/members/99/payments Completed 302 Found in 13ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/99/payments" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"99"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "99"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 99]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 99]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 100]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 99]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.1ms | ActiveRecord: 5.0ms) Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 100]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (1.0ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 55], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 55], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 55], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 102]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 102]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 102], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/102/payments/new" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"102"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "102"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 55]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 102]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.9ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/102/payments" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"102"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "102"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 102]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 55]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 102], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 102]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 38], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["payment_id", 15], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/102/payments Completed 302 Found in 18ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/102/payments" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"102"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "102"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 102]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 102]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 102]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.3ms | ActiveRecord: 4.3ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 102]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 103]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 103]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 103], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 104]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 104]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 104], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/15/reglements/new" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"15"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 102]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 103]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 104]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 40]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.6ms | ActiveRecord: 5.2ms) Started POST "/adherent/payments/15/reglements" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"39"}, "commit"=>"Enregistrer", "payment_id"=>"15"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "39"]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 39], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["payment_id", 15], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 102]] Redirected to http://www.example.com/adherent/members/102/payments Completed 302 Found in 12ms (ActiveRecord: 3.9ms) Started GET "/adherent/members/102/payments" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"102"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "102"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 102]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 102]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 39]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 103]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 102]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.1ms | ActiveRecord: 4.5ms)  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 56], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 56], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 56], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 105]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 105]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 105], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/105/payments/new" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"105"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "105"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 56]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 105]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 41]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.8ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/105/payments" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"105"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "105"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 105]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 56]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 105], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 105]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 41]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 41], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["payment_id", 16], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/105/payments Completed 302 Found in 17ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/105/payments" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"105"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "105"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 105]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 41]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 105]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 105]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.2ms | ActiveRecord: 4.0ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 105]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 41]]  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 57], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 57], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 57], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (1.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 108]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 108]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 108], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/108/payments/new" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"108"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]] Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 57]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 108]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 42]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.7ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/108/payments" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"108"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 108]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 57]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 108], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 108]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 42]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 42], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["payment_id", 17], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/108/payments Completed 302 Found in 18ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/108/payments" for 127.0.0.1 at 2015-04-14 20:42:13 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"108"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "108"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 108]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 42]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 108]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 108]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.1ms | ActiveRecord: 4.7ms)  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 108]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 58], ["updated_at", Tue, 14 Apr 2015 18:42:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 58], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 58], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 111]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 111]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 111], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/111/payments/new" for 127.0.0.1 at 2015-04-14 20:42:14 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"111"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "111"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 58]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 111]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 43]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.6ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/111/payments" for 127.0.0.1 at 2015-04-14 20:42:14 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"111"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "111"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 111]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 58]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 111], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 111]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 43]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 43], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["payment_id", 18], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/111/payments Completed 302 Found in 17ms (ActiveRecord: 4.1ms) Started GET "/adherent/members/111/payments" for 127.0.0.1 at 2015-04-14 20:42:14 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"111"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "111"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 111]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 43]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 111]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 111]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.2ms | ActiveRecord: 3.9ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 111]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 59], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 59], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 59], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 114]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 114]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 114], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/114/payments/new" for 127.0.0.1 at 2015-04-14 20:42:14 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"114"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 59]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 114]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 44]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.4ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/114/payments" for 127.0.0.1 at 2015-04-14 20:42:14 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"114"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 114]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 59]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 114], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 114]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 44]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 44], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["payment_id", 19], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/114/payments Completed 302 Found in 17ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/114/payments" for 127.0.0.1 at 2015-04-14 20:42:14 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"114"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 114]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 44]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 114]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 114]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.1ms | ActiveRecord: 3.6ms)  (1.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 114]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 60], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 60], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 60], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 117]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 117]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 117], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (1.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/117/payments/new" for 127.0.0.1 at 2015-04-14 20:42:14 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"117"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 60]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 117]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.3ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/117/payments" for 127.0.0.1 at 2015-04-14 20:42:14 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"117"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 60]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 117], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 117]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 45], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["payment_id", 20], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/117/payments Completed 302 Found in 17ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/117/payments" for 127.0.0.1 at 2015-04-14 20:42:14 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"117"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 117]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 45]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 20]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.0ms | ActiveRecord: 3.7ms)  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 117]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 61], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 61], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 61], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 120]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 120]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 120], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/120/payments/new" for 127.0.0.1 at 2015-04-14 20:42:14 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"120"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 61]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 120]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 14.4ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/120/payments" for 127.0.0.1 at 2015-04-14 20:42:14 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"120"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 61]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 120], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 120]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 46], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["payment_id", 21], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/120/payments Completed 302 Found in 17ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/120/payments" for 127.0.0.1 at 2015-04-14 20:42:14 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"120"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 120]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 46]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Adherent::Reglement Load (1.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.4ms | ActiveRecord: 4.5ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 62], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 62], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 62], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 123]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 123]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 123], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 123]] Started GET "/adherent/members/123/payments/new" for 127.0.0.1 at 2015-04-14 20:42:14 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"123"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 62]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 123]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 47]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.2ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/123/payments" for 127.0.0.1 at 2015-04-14 20:42:14 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"123"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 62]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 123], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 123]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 47]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 47], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["payment_id", 22], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/123/payments Completed 302 Found in 16ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/123/payments" for 127.0.0.1 at 2015-04-14 20:42:14 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"123"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 123]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 47]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 22]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.7ms | ActiveRecord: 4.2ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 123]]  (0.6ms) ROLLBACK  (0.5ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 63], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 126], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 126]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 126]]  (0.7ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["from_date", Fri, 15 May 2015], ["member_id", 126], ["to_date", Sat, 14 May 2016], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 63]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 64], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 127], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 127]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 127]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["from_date", Fri, 15 May 2015], ["member_id", 127], ["to_date", Sat, 14 May 2016], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 64]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 127], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 127]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 50]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 50], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["payment_id", 23], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 51]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 51], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["payment_id", 23], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 23]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 65], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 128], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 128]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 128]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["from_date", Fri, 15 May 2015], ["member_id", 128], ["to_date", Sat, 14 May 2016], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 128]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 65]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 128], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 128]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 52]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 52], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["payment_id", 24], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (1.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 66], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 129], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 129]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 129]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["from_date", Fri, 15 May 2015], ["member_id", 129], ["to_date", Sat, 14 May 2016], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 66]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 67], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 130], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 130]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 130]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["from_date", Fri, 15 May 2015], ["member_id", 130], ["to_date", Sat, 14 May 2016], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 67]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 130], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 130]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 56]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 56], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["payment_id", 25], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 57]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 57], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00], ["payment_id", 25], ["updated_at", Tue, 14 Apr 2015 18:42:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 131]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 131 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 131], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.9ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 132]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 132 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 132], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 133]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 133 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 133], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 133 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 133], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 133], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 134]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 134 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 134], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 134 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 134], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]] SQL (0.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 134], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 135]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 135 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 135], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 135 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 135], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 135], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 136]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 136 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 136], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 136 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 136], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]] SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 136], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 137]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 137 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 137], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 137 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 137], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 137], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 137], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 137]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 137]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 66]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 66], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["payment_id", 26], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 137], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 137]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 137]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 66]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 66], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["payment_id", 27], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 67]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 67], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["payment_id", 27], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 137], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 137]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 137]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 67]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 67], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["payment_id", 28], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 138]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 138 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 138], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 138 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 138], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 138], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 138], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 138]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 68]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 68], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["payment_id", 29], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 138], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 138]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 68]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 68], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["payment_id", 30], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 69]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 69], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["payment_id", 30], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 139]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 139 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 139], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 139 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 139], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 139], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 139], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 139]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 139]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 70]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 70], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["payment_id", 31], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 140]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 140 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 140], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 140 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 140], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 140], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 140], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 140]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 140]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 72]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 72], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["payment_id", 32], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 140], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 140]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 140]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 72]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 72], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["payment_id", 33], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 73]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 73], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00], ["payment_id", 33], ["updated_at", Tue, 14 Apr 2015 18:46:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 141]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 141 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 141], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 142]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 142 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 142], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 143]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 143 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 143], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 143 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 143], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 143], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 144]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 144 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 144], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 144 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 144], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 144], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 145]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 145 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 145], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 145 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 145], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 145], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 146]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 146 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 146], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 146 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 146], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 146], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 146], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 146]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 146]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 80]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 80], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["payment_id", 34], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 147]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 147 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 147], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 147 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 147], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 147], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 147], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 147]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 147]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 82]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 82], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["payment_id", 35], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 147], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 147]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 147]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 82]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 82], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["payment_id", 36], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 83]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 83], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["payment_id", 36], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 148]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 148 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 148], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 148 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 148], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 148], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 148], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 148]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 148]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 84]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 84], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["payment_id", 37], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 148], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 148]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 148]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 84]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 84], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["payment_id", 38], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 85]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 85], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["payment_id", 38], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 149]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 149 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 149], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 149 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 149], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 149], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 149], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 149]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 149]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 86]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 86], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["payment_id", 39], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 149], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 149]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 149]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 86]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 86], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["payment_id", 40], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 87]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 87], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["payment_id", 40], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 149], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 149]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 149]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 87]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 87], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["payment_id", 41], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 150]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 150 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 150], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 150 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 150], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 150], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 154]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 154]]  (0.5ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 154], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 154]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 154]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 155]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 155]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 155], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 155]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 155]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 156]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 156]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 156], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 156]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 156]]  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"14/04/2016", "from_date"=>"14/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x6234d16 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (0.3ms) Completed 200 OK in 29ms (Views: 7.4ms | ActiveRecord: 4.9ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"14/04/2016", "from_date"=>"14/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x62b6bb8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x62b6bb8%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"14/04/2016", "from_date"=>"14/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x62d086a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x62d086a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62eff30 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6303fe4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6310186 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6310186%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x632bbf2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x632bbf2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 2.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x633e96e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x63596d8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x636c3a0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x636c3a0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x638437e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6398388 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x63b3e80 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 81) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 81], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/157/coord/new" for 127.0.0.1 at 2015-04-14 20:46:51 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"157"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "157"]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 157]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (43.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (2.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (24.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.2ms) Completed 200 OK in 107ms (Views: 83.7ms | ActiveRecord: 5.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 82) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 82) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 82], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/158/coord/new" for 127.0.0.1 at 2015-04-14 20:46:51 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"158"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "158"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 158]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 20.7ms | ActiveRecord: 1.6ms) Started POST "/adherent/members/158/coord" for 127.0.0.1 at 2015-04-14 20:46:51 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"158"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "158"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 158]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 158], ["office", ""], ["tel", ""], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/158/adhesions/new Completed 302 Found in 12ms (ActiveRecord: 3.1ms) Started GET "/adherent/members/158/adhesions/new" for 127.0.0.1 at 2015-04-14 20:46:51 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"158"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "158"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 158]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 158]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (13.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 18.5ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 83) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 83) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 83], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/159/coord/new" for 127.0.0.1 at 2015-04-14 20:46:51 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"159"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "159"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 159]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (19.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 22.7ms | ActiveRecord: 1.5ms) Started POST "/adherent/members/159/coord" for 127.0.0.1 at 2015-04-14 20:46:51 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"159"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "159"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 159]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 159], ["office", ""], ["tel", ""], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/159/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 3.1ms) Started GET "/adherent/members/159/adhesions/new" for 127.0.0.1 at 2015-04-14 20:46:51 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"159"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "159"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 159]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 159]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.7ms | ActiveRecord: 2.1ms) Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 159]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 84) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 84) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 84], ["updated_at", Tue, 14 Apr 2015 18:46:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/160/coord/new" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"160"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "160"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 160]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (20.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 23.2ms | ActiveRecord: 1.4ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/160/coord" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"160"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "160"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 160]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 160], ["office", ""], ["tel", ""], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/160/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 2.4ms) Started GET "/adherent/members/160/adhesions/new" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"160"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "160"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 160]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 160]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.7ms | ActiveRecord: 2.0ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["member_id", 161], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["zip", 59000]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 161]]  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 28]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 161]] SQL (0.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 161]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 85) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 85) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 85], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/162/adhesions/new" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"162"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "162"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 162]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 162]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.5ms | ActiveRecord: 1.6ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 86) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 86) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 86], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/163/adhesions/new" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"163"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "163"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 163]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 163]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.2ms | ActiveRecord: 1.6ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 163]] Started POST "/adherent/members/163/adhesions" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"163"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "163"]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 163], ["to_date", Thu, 31 Jul 2014], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/163/adhesions Completed 302 Found in 8ms (ActiveRecord: 2.2ms) Started GET "/adherent/members/163/adhesions" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"163"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "163"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 163]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 163]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 93]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 93]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 16.2ms | ActiveRecord: 3.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 163]] SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 87) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 87], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 164], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/164/adhesions" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"164"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "164"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 164]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 164]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 94]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 94]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 7.4ms | ActiveRecord: 2.3ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 88], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 165], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/165/adhesions" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"165"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "165"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 165]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 165]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 95]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 95]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 8.7ms | ActiveRecord: 2.1ms) Started GET "/adherent/members/165/adhesions/95/edit" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"165", "id"=>"95"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "165"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 165], ["id", "95"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 13.2ms | ActiveRecord: 1.6ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 89) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 89) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 89], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 166], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/166/adhesions" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"166"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "166"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 166]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 166]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 96]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 96]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 8.1ms | ActiveRecord: 2.4ms) Started GET "/adherent/members/166/payments/new" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"166"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "166"]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 89]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 166]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 96]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (24.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 64ms (Views: 33.2ms | ActiveRecord: 6.3ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x634336a @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.4ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x6308a3a @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x62dcbb0 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x62dcbec%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 93], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 93], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 93], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 167]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 167]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 167], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/167/payments/new" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"167"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "167"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 93]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 167]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 97]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.4ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/167/payments" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"167"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "167"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 167]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 93]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 167], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 167]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 97]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 97], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["payment_id", 42], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/167/payments Completed 302 Found in 23ms (ActiveRecord: 5.9ms) Started GET "/adherent/members/167/payments" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"167"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "167"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 167]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 97]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 167]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 167]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 22.5ms | ActiveRecord: 5.8ms)  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 167]]  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 94) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 94) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 94], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 94) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 94) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 94], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 94) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 94) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 94], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 170]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 170]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 170], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 170]] Started GET "/adherent/members/170/payments/new" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"170"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "170"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 94]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 170]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 98]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.5ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/170/payments" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"170"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "170"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 170]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 94]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 170], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 170]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 98]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 98], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["payment_id", 43], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/170/payments Completed 302 Found in 17ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/170/payments" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"170"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "170"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 170]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 98]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 170]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 170]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.1ms | ActiveRecord: 4.1ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 170]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 95], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 95], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 95], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 173]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 173]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 173], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/173/payments/new" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"173"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "173"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 95]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 173]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 99]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.6ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/173/payments" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"173"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "173"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 173]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 95]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 173], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 173]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 99]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 99], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["payment_id", 44], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/173/payments Completed 302 Found in 17ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/173/payments" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"173"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "173"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 173]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 99]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 173]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 173]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.7ms | ActiveRecord: 4.4ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 96], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 96], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 96], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 176]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 176]]  (0.8ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 176], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/176/payments/new" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"176"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "176"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 96]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 176]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 100]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.1ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/176/payments" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"176"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "176"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 176]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 96]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 176], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 176]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 100]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 100], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["payment_id", 45], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/176/payments Completed 302 Found in 16ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/176/payments" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"176"} Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "176"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 176]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 100]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 176]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 176]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.8ms | ActiveRecord: 5.2ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 176]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 177]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 177]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 177], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 178]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 178]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 178], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/45/reglements/new" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"45"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "45"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 176]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 177]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 101]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 102]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (17.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 20.5ms | ActiveRecord: 6.4ms) Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 176]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 176]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]]  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 97], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 97], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 97], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 179]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 179]]  (1.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 179], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/179/payments/new" for 127.0.0.1 at 2015-04-14 20:46:52 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"179"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "179"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 97]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 179]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 103]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.3ms | ActiveRecord: 2.0ms) Started POST "/adherent/members/179/payments" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"179"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "179"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 179]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 97]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 179], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 179]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 103]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 103], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["payment_id", 46], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/179/payments Completed 302 Found in 17ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/179/payments" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"179"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "179"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 179]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 103]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 179]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 179]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.7ms | ActiveRecord: 4.1ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 179]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 180]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 180]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 180], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 181]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 181]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 181], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/46/reglements/new" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"46"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "46"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 179]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 180]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 104]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 181]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 105]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 17.2ms | ActiveRecord: 5.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 98], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 98], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 98], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 182]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 182]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 182], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/182/payments/new" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"182"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "182"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 98]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 182]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 106]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 19.9ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/182/payments" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"182"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "182"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 182]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 98]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 182], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 182]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 106]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 106], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["payment_id", 47], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/182/payments Completed 302 Found in 15ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/182/payments" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"182"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "182"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 182]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 106]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 182]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 182]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.4ms | ActiveRecord: 4.0ms) Adherent::Payment Load (1.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 182]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 183]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 183]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 183], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 184]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 184]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 184], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/47/reglements/new" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"47"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "47"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 182]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 183]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 107]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 184]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 108]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.9ms | ActiveRecord: 5.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 99], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 99], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 99], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 185]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 185]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 185], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (1.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/185/payments/new" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"185"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "185"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 99]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 185]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 109]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.2ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/185/payments" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"185"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "185"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 185]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 99]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 185], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 185]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 109]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 109], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["payment_id", 48], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/185/payments Completed 302 Found in 16ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/185/payments" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"185"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "185"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 185]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 109]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 185]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 185]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.8ms | ActiveRecord: 3.4ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 185]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 186]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 186]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 186], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 187]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 187]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 187], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/48/reglements/new" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"48"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "48"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 185]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 48]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 186]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 110]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 187]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 111]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 15.8ms | ActiveRecord: 5.3ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 100], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 100], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 100], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 188]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 188]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 188], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/188/payments/new" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"188"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "188"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 100]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 188]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 112]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.1ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/188/payments" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"188"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "188"]]  (1.0ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 188]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 100]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 188], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 188]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 112]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 112], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["payment_id", 49], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/188/payments Completed 302 Found in 17ms (ActiveRecord: 5.6ms) Started GET "/adherent/members/188/payments" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"188"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "188"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 188]] Adherent::Reglement Load (1.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 112]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 188]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 188]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.0ms | ActiveRecord: 4.8ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 188]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 189]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 189]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 189], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 190]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 190]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 190], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/49/reglements/new" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"49"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "49"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 188]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 190]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 114]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 189]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 113]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 17.0ms | ActiveRecord: 5.1ms) Started POST "/adherent/payments/49/reglements" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"113"}, "commit"=>"Enregistrer", "payment_id"=>"49"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "49"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "113"]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 113]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 113], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["payment_id", 49], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 188]] Redirected to http://www.example.com/adherent/members/188/payments Completed 302 Found in 12ms (ActiveRecord: 4.2ms) Started GET "/adherent/members/188/payments" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"188"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "188"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 188]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 112]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 188]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 113]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 189]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 49]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 188]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.9ms | ActiveRecord: 4.4ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 113]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 189]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 101], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 101], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 101], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 191]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 191]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 191], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/191/payments/new" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"191"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "191"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 101]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 191]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 115]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.9ms | ActiveRecord: 1.9ms) Started POST "/adherent/members/191/payments" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"191"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "191"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 191]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 101]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 191], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 191]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 115]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 115], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["payment_id", 50], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/191/payments Completed 302 Found in 16ms (ActiveRecord: 4.0ms) Started GET "/adherent/members/191/payments" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"191"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "191"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 191]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 115]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 191]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 191]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 13.0ms | ActiveRecord: 3.7ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 191]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 192]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 192]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 192], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 193]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 193]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 193], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/50/reglements/new" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"50"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "50"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 191]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 193]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 117]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 192]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 116]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 16.6ms | ActiveRecord: 5.0ms) Started POST "/adherent/payments/50/reglements" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"116"}, "commit"=>"Enregistrer", "payment_id"=>"50"} Organism Load (2.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "50"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "116"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 116]]  (0.6ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 116], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["payment_id", 50], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 191]] Redirected to http://www.example.com/adherent/members/191/payments Completed 302 Found in 17ms (ActiveRecord: 7.5ms) Started GET "/adherent/members/191/payments" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"191"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "191"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 191]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 115]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 191]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 116]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 192]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 50]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 191]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.7ms | ActiveRecord: 5.8ms)  (1.7ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (1.9ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 102], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 102], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 102], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 194]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 194]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 194], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/194/payments/new" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"194"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "194"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 102]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 194]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 118]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (17.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 20.6ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/194/payments" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"194"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "194"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 194]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 102]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 194], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 194]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 118]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 118], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["payment_id", 51], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/194/payments Completed 302 Found in 21ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/194/payments" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"194"} Organism Load (2.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "194"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 194]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 118]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 194]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 194]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.3ms | ActiveRecord: 6.2ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 194]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 195]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 195]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 195], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 196]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 196]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 196], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/51/reglements/new" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"51"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "51"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 194]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 196]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 120]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 195]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 119]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 24.0ms | ActiveRecord: 5.1ms) Started POST "/adherent/payments/51/reglements" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"119"}, "commit"=>"Enregistrer", "payment_id"=>"51"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "51"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "119"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 119]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 119], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00], ["payment_id", 51], ["updated_at", Tue, 14 Apr 2015 18:46:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 194]] Redirected to http://www.example.com/adherent/members/194/payments Completed 302 Found in 12ms (ActiveRecord: 3.8ms) Started GET "/adherent/members/194/payments" for 127.0.0.1 at 2015-04-14 20:46:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"194"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "194"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 194]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 118]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 194]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 119]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 195]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 51]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 194]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.0ms) Completed 200 OK in 21ms (Views: 15.3ms | ActiveRecord: 4.5ms) Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 195]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 119]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 103], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 103], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 103], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 197]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 197]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 197], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/197/payments/new" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"197"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "197"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 103]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 197]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 121]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.2ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/197/payments" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"197"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "197"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 197]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 103]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 197], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 197]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 121]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 121], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["payment_id", 52], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/197/payments Completed 302 Found in 17ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/197/payments" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"197"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "197"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 197]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 121]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 197]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 197]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.6ms | ActiveRecord: 3.8ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 197]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 198]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 198]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 198], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 199]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 199]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 199], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/52/reglements/new" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"52"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "52"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 197]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 198]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 122]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 199]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 123]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 15.5ms | ActiveRecord: 6.2ms) Started POST "/adherent/payments/52/reglements" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"122"}, "commit"=>"Enregistrer", "payment_id"=>"52"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "52"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "122"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 122]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 122], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["payment_id", 52], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 197]] Redirected to http://www.example.com/adherent/members/197/payments Completed 302 Found in 12ms (ActiveRecord: 4.1ms) Started GET "/adherent/members/197/payments" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"197"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "197"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 197]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 121]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 197]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 122]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 198]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 52]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 197]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.9ms | ActiveRecord: 4.5ms) Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 121]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 197]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 104) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 104) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 104], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 104) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 104) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 104], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 104) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 104) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 104], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 200]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 200]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 200], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/200/payments/new" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"200"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "200"]] Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 104]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 200]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 124]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.9ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/200/payments" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"200"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "200"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 200]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 104]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 200], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 200]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 124]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 124], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["payment_id", 53], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/200/payments Completed 302 Found in 17ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/200/payments" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"200"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "200"]] Adherent::Payment Load (0.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 200]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 124]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 200]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 200]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.4ms | ActiveRecord: 3.6ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 200]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 201]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 201]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 201], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 202]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 202]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 202], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/53/reglements/new" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"53"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "53"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 200]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 202]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 126]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 201]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 125]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.8ms | ActiveRecord: 5.0ms) Started POST "/adherent/payments/53/reglements" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"125"}, "commit"=>"Enregistrer", "payment_id"=>"53"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "53"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "125"]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 125]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 125], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["payment_id", 53], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 200]] Redirected to http://www.example.com/adherent/members/200/payments Completed 302 Found in 11ms (ActiveRecord: 3.6ms) Started GET "/adherent/members/200/payments" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"200"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "200"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 200]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 124]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 200]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 125]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 201]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 53]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 200]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 15.2ms | ActiveRecord: 4.3ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 105) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 105) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 105], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 105) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 105) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 105], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 105) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 105) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 105], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 203]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 203]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 203], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/203/payments/new" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"203"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "203"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 105]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 203]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 127]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.8ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/203/payments" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"203"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "203"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 203]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 105]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 203], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 203]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 127]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 127], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["payment_id", 54], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/203/payments Completed 302 Found in 16ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/203/payments" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"203"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "203"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 203]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 127]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 203]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 203]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.8ms | ActiveRecord: 3.6ms)  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 203]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 106) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 106) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 106], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 106) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 106) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 106], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 106) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 106) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 106], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 206]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 206]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 206], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/206/payments/new" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"206"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "206"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 106]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 206]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 128]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.7ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/206/payments" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"206"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "206"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 206]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 106]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 206], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 206]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 128]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 128], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["payment_id", 55], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/206/payments Completed 302 Found in 16ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/206/payments" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"206"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "206"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 206]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 55]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 128]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 206]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 55]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 55]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 55]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 55]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 206]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 12.1ms | ActiveRecord: 3.4ms) Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 206]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 128]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 107) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 107) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 107], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 107) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 107) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 107], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 107) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 107) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 107], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 209]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 209]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 209], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/209/payments/new" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"209"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "209"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 107]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 209]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 129]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.1ms | ActiveRecord: 2.0ms) Started POST "/adherent/members/209/payments" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"209"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "209"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 209]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 107]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 209], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 209]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 129]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 129], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["payment_id", 56], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/209/payments Completed 302 Found in 16ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/209/payments" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"209"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "209"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 209]] Adherent::Reglement Load (1.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 56]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 129]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 209]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 56]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 56]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 56]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 56]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 209]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 18.8ms | ActiveRecord: 4.3ms)  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 209]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 108) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 108) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 108], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 108) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 108) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 108], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 108) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 108) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 108], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 212]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 212]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 212], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/212/payments/new" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"212"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "212"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 108]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 212]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 130]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.7ms | ActiveRecord: 2.0ms) Started POST "/adherent/members/212/payments" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"212"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "212"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 212]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 108]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 212], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 212]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 130]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 130], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["payment_id", 57], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/212/payments Completed 302 Found in 17ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/212/payments" for 127.0.0.1 at 2015-04-14 20:46:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"212"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "212"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 212]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 130]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 212]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 212]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.5ms | ActiveRecord: 3.8ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 212]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 57]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 215]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 215 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 215], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.1ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 216]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 216 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 216], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 217]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 217 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 217], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 217 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 217], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 217], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 218]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 218 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 218], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 218 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 218], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]] SQL (0.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 218], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.6ms) DELETE FROM "adherent_members" SQL (1.8ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 219]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 219 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 219], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 219 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 219], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 219], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 219], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 219]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 219]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 135]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 135], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["payment_id", 58], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 220]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 220 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 220], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 220 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 220], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 220], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 220], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 220]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 220]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 137]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 137], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["payment_id", 59], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 220], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:54 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 220]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 220]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 137]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 137], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["payment_id", 60], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 138]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 138], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["payment_id", 60], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 221]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 221 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 221], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 221 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 221], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 221], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 221], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 221]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 221]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 139]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 139], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["payment_id", 61], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 221], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 221]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 221]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 139]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 139], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["payment_id", 62], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 140]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 140], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["payment_id", 62], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 221], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 221]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 221]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 140]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 140], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["payment_id", 63], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 222]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 222 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 222], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 222 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 222], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 222], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 222], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 222]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 222]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 141]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 141], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["payment_id", 64], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 222], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 222]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 222]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 141]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 141], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["payment_id", 65], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 142]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 142], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["payment_id", 65], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 223]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 223 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 223], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 223 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 223], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 223], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 224]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 224 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 224], ["tel", "01.02.03.04.05"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 224 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 224], ["to_date", Sat, 31 Jan 2015], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 224], ["to_date", Sat, 28 Feb 2015], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 109) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 109) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 109], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 225]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 225]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 225], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/225/payments/new" for 127.0.0.1 at 2015-04-14 20:46:55 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"225"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "225"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 109]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 225]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.5ms | ActiveRecord: 1.7ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 110) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 110) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 110], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 226]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 226]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 226], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/226/payments/new" for 127.0.0.1 at 2015-04-14 20:46:55 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"226"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "226"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 110]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 226]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.9ms | ActiveRecord: 1.9ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 226]] Started POST "/adherent/members/226/payments" for 127.0.0.1 at 2015-04-14 20:46:55 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"14/04/2015", "comment"=>"", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"226"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "226"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 226]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 110]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 226], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 226]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/226/payments Completed 302 Found in 12ms (ActiveRecord: 3.6ms) Started GET "/adherent/members/226/payments" for 127.0.0.1 at 2015-04-14 20:46:55 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"226"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "226"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 226]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 66]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 66]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 66]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 66]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 66]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 226]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.5ms | ActiveRecord: 4.0ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 226]] SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 111) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 111) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 111], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 227]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 227]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 227], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 227]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 111]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 227], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] Adherent::Adhesion Load (0.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 227]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/227/payments/67" for 127.0.0.1 at 2015-04-14 20:46:55 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"227", "id"=>"67"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "227"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 67 LIMIT 1 [["member_id", 227]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 67]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 67]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 227]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 67]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 67]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 67]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (7.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 30ms (Views: 24.1ms | ActiveRecord: 3.8ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 112) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 112) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 112], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 228]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 228]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 228], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 228]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 112]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 228], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 228]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/228/payments/68" for 127.0.0.1 at 2015-04-14 20:46:55 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"228", "id"=>"68"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "228"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 68 LIMIT 1 [["member_id", 228]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 68]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 68]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 228]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 68]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 68]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 68]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.3ms | ActiveRecord: 3.6ms) SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 113) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 113) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 113], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 229]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 229]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 229], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 229]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 113]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 229], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 229]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/229/payments/69" for 127.0.0.1 at 2015-04-14 20:46:55 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"229", "id"=>"69"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "229"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 69 LIMIT 1 [["member_id", 229]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 69]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 69]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 229]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 69]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 69]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 69]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (1.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.4ms | ActiveRecord: 3.9ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 114) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 114) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 114], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 230]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 230]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 230], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/230/payments/new" for 127.0.0.1 at 2015-04-14 20:46:55 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"230"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "230"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 114]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 230]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (16.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 19.6ms | ActiveRecord: 1.6ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 115) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 115) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 115], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 231]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 231]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 231], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/231/payments/new" for 127.0.0.1 at 2015-04-14 20:46:55 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"231"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "231"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 115]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 231]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.2ms | ActiveRecord: 1.6ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 116) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 116) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 116], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 232]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 232]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 232], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 232]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 116]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 232], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] Adherent::Adhesion Load (0.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 232]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/232/payments" for 127.0.0.1 at 2015-04-14 20:46:55 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"232"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "232"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 232]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 70]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 70]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 70]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 70]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 70]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 232]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (7.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 9.6ms | ActiveRecord: 3.5ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 117) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 117) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 117], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 233]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 233]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 233], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 233]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 117]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 233], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 233]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/233/payments" for 127.0.0.1 at 2015-04-14 20:46:55 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"233"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "233"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 233]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 71]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 71]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 71]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 71]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 71]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 233]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 9.7ms | ActiveRecord: 3.2ms) Started GET "/adherent/payments/71/reglements/new" for 127.0.0.1 at 2015-04-14 20:46:55 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"71"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "71"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 233]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 71]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 71]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 71]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 71]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 10.9ms | ActiveRecord: 3.4ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 118) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 118) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 118], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 118) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 118) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 118], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 234], ["to_date", Sat, 31 Aug 2013], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 235], ["to_date", Sat, 31 Aug 2013], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 235]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 118]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 235], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 235]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 157]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 157], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["payment_id", 72], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 235]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 118]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 235], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 235]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 157]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 157], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["payment_id", 73], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 234]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 118]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 234], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 234]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 156]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 156], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["payment_id", 74], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 119) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 119) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 119], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 119) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 119) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 119], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 236], ["to_date", Sat, 31 Aug 2013], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 237], ["to_date", Sat, 31 Aug 2013], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 237]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 119]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 237], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 237]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 159]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 159], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["payment_id", 75], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 120) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 120) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 120], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 120) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 120) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 120], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 238], ["to_date", Sat, 31 Aug 2013], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 239], ["to_date", Sat, 31 Aug 2013], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 239]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 120]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 239], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 239]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 161]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 161], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["payment_id", 76], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 238]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 120]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 238], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 238]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 160]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 160], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["payment_id", 77], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 1], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 162]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 162], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["payment_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 1], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 163]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 163], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["payment_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 163]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.4ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 1], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 164]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 164], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["payment_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 164]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 164]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.5ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 124) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 124], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/240/coord/new Completed 302 Found in 9ms (ActiveRecord: 3.2ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 125) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 125], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/241/coord/new Completed 302 Found in 9ms (ActiveRecord: 3.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 126) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 126], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/242/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.2ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5d47d30 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 4ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5d2ff0a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 4ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 130; Completed 200 OK in 8ms (Views: 2.1ms | ActiveRecord: 3.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as XLS Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 131;  Adherent::QueryMember Load (0.9ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 131; Sent data Mon association-14-avr-2015-Membres.xls (1.3ms) Completed 200 OK in 8ms (Views: 1.1ms | ActiveRecord: 4.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 132;  Adherent::QueryMember Load (0.9ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 132; Sent data Mon association-14-avr-2015-Membres.csv (0.4ms) Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 4.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"243"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/243 Completed 302 Found in 5ms (ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"244"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/244 Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.5ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"245"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"246"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 246 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 246 [["name", "Dalton"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/246 Completed 302 Found in 9ms (ActiveRecord: 3.2ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x583dbc8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x583dbc8%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x57fd122 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 3.3ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x57c3b2a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.0ms | ActiveRecord: 1.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5795d7e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x576d6a8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x576d6a8%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x573c4ae @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.2ms)  (0.6ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x56e547e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x568f0e2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x568f0e2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 5ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5651dd2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x561e7d4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x55e900c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 151) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 151) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 151], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 247], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 247]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 247]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["from_date", Fri, 15 May 2015], ["member_id", 247], ["to_date", Sat, 14 May 2016], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 247]] Organism Load (0.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 151]]  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 152) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 152) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 152], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 248], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 248]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 248]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["from_date", Fri, 15 May 2015], ["member_id", 248], ["to_date", Sat, 14 May 2016], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 248]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 152]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 248], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 248]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 167]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 167], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["payment_id", 78], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 168]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 168], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["payment_id", 78], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 153) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 153) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 153], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 249], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 249]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 249]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["from_date", Fri, 15 May 2015], ["member_id", 249], ["to_date", Sat, 14 May 2016], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 249]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 153]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 154) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 154) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 154], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 250], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 250]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 250]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["from_date", Fri, 15 May 2015], ["member_id", 250], ["to_date", Sat, 14 May 2016], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 250]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 154]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 250], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 250]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 171]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 171], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["payment_id", 79], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 172]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 172], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["payment_id", 79], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 79]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 79]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 155) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 155) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 155], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 251], ["to_date", Thu, 14 May 2015], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 251]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 251]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["from_date", Fri, 15 May 2015], ["member_id", 251], ["to_date", Sat, 14 May 2016], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 251]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 155]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 251], ["mode", "CB"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 251]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 173]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 173], ["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["payment_id", 80], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62f82c0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.3ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62c2a58 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6299590 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x6298762 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.8ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"14/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x62778b4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"14/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x6252460 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6252460%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"14/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x622c4f4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x622c4f4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x61f83de @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 163) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 163) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 163], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 163) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 163) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 163], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 163) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 163) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 163], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 163) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 163) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 163], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 163) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 163) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 163], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:46:56 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 163;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.2ms) Completed 200 OK in 31ms (Views: 27.5ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 164) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 164) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 164], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 164) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 164) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 164], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 164) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 164) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 164], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 164) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 164) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 164], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 164) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 164) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 164], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:46:56 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 164;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 13.5ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 165) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 165) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 165], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 165) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 165) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 165], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 165) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 165) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 165], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 165) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 165) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 165], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 165) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 165) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 165], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:46:56 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 165;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 13.0ms | ActiveRecord: 1.9ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 262]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 262]]  (1.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 262], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/262/adhesions" for 127.0.0.1 at 2015-04-14 20:46:56 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"262"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "262"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 262]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 262]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 175]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 175]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 13.3ms | ActiveRecord: 2.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 166) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 166) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 166], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 166) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 166) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 166], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 166) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 166) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 166], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 166) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 166) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 166], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 166) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 166) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 166], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:46:56 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 166;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 13.8ms | ActiveRecord: 1.6ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/267/adhesions" for 127.0.0.1 at 2015-04-14 20:46:56 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"267"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "267"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 267]] Redirected to http://www.example.com/adherent/members/267/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.6ms) Started GET "/adherent/members/267/adhesions/new" for 127.0.0.1 at 2015-04-14 20:46:56 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"267"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "267"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 267]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 267]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 15.3ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (2.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 167) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 167) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 167], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 167) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 167) LIMIT 1 SQL (2.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 167], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 167) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 167) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 167], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 167) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 167) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 167], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 167) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 167) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 167], ["updated_at", Tue, 14 Apr 2015 18:46:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:46:56 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 167;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 14.7ms | ActiveRecord: 1.6ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/272/payments" for 127.0.0.1 at 2015-04-14 20:46:57 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"272"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "272"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 272]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 11ms (Views: 7.3ms | ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 168) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 168) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 168], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 168) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 168) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 168], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 168) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 168) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 168], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 168) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 168) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 168], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 168) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 168) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 168], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:46:57 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 168;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 13.6ms | ActiveRecord: 1.7ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2015-04-14 20:46:57 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 16.4ms | ActiveRecord: 0.9ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 169) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 169) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 169], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 169) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 169) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 169], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 169) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 169) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 169], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 169) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 169) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 169], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 169) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 169) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 169], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:46:57 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 169; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 13.5ms | ActiveRecord: 1.8ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/282/coord" for 127.0.0.1 at 2015-04-14 20:46:57 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"282"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "282"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 282]] Redirected to http://www.example.com/adherent/members/282/coord/new Completed 302 Found in 5ms (ActiveRecord: 1.6ms) Started GET "/adherent/members/282/coord/new" for 127.0.0.1 at 2015-04-14 20:46:57 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"282"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "282"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 282]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 21.6ms | ActiveRecord: 1.3ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 170) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 170) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 170], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 170) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 170) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 170], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 170) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 170) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 170], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 170) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 170) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 170], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 170) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 170) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 170], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:46:57 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 170;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 13.7ms | ActiveRecord: 1.9ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/287/edit" for 127.0.0.1 at 2015-04-14 20:46:57 +0200 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"287"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "287"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 15.3ms | ActiveRecord: 1.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 171) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 171) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 171], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 171) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 171) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 171], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 171) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 171) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 171], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 171) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 171) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 171], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 171) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 171) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 171], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:46:57 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 171; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 14.5ms | ActiveRecord: 2.0ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["member_id", 292], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 292]] Started GET "/adherent/members/292/coord" for 127.0.0.1 at 2015-04-14 20:46:57 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"292"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "292"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 292]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 9ms (Views: 5.7ms | ActiveRecord: 1.3ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 172) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 172) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 172], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 172) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 172) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 172], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 172) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 172) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 172], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 172) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 172) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 172], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 172) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 172) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 172], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2015-04-14 20:46:57 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 12.1ms | ActiveRecord: 0.8ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2015-04-14 20:46:57 +0200 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 172) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 172], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/302/coord/new Completed 302 Found in 7ms (ActiveRecord: 2.1ms) Started GET "/adherent/members/302/coord/new" for 127.0.0.1 at 2015-04-14 20:46:57 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"302"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "302"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 302]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 21.0ms | ActiveRecord: 1.2ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members"  (0.3ms) ROLLBACK SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (91.6ms) COMMIT Adherent::Member Exists (2.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 173) LIMIT 1  (0.9ms) BEGIN Adherent::Member Exists (1.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 173) LIMIT 1 SQL (3.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 173], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (3.6ms) COMMIT Adherent::Member Exists (1.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 173) LIMIT 1  (0.7ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 173) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 173], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 173) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 173) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 173], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 173) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 173) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 173], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 173) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 173) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 173], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) BEGIN Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 303]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 173]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00], ["date", Tue, 14 Apr 2015], ["member_id", 303], ["mode", "Chèque"], ["updated_at", Tue, 14 Apr 2015 18:46:57 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 303]]  (1.3ms) COMMIT Started GET "/adherent/members/303/payments/81" for 127.0.0.1 at 2015-04-14 20:47:01 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"303", "id"=>"81"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "303"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 81 LIMIT 1 [["member_id", 303]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 81]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 81]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 303]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 81]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 81]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 81]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (5.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 44ms (Views: 23.5ms | ActiveRecord: 15.0ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-04-14 20:47:01 +0200 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-04-14 20:47:01 +0200 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-04-14 20:47:01 +0200 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-04-14 20:47:01 +0200 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-04-14 20:47:01 +0200 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-04-14 20:47:01 +0200 Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-04-14 20:47:01 +0200 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-04-14 20:47:01 +0200 Started DELETE "/adherent/members/303/payments/81" for 127.0.0.1 at 2015-04-14 20:47:02 +0200 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"303", "id"=>"81"} Organism Load (3.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "303"]] Adherent::Payment Load (4.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 303], ["id", "81"]]  (0.5ms) BEGIN Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 81]] SQL (0.5ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 81]]  (194.7ms) COMMIT Redirected to http://127.0.0.1:39116/adherent/members/303/payments Completed 302 Found in 215ms (ActiveRecord: 204.7ms) Started GET "/adherent/members/303/payments" for 127.0.0.1 at 2015-04-14 20:47:02 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"303"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "303"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 303]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 6.1ms | ActiveRecord: 10.2ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-04-14 20:47:02 +0200  (1.5ms) SELECT COUNT(*) FROM "adherent_payments"  (2.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (5.4ms) select table_name from information_schema.views where table_schema = 'adh_test'  (121.6ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_reglements", "organisms", "adherent_payments" RESTART IDENTITY CASCADE;  (0.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:47:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:47:03 UTC +00:00]]  (51.1ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:47:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:47:03 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:47:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:47:03 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:47:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:47:03 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:47:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:47:03 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:47:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:47:03 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:47:03 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 19.3ms | ActiveRecord: 2.8ms) Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-04-14 20:47:04 +0200 Started GET "/assets/adherent/icones/csv.png" for 127.0.0.1 at 2015-04-14 20:47:04 +0200 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-04-14 20:47:04 +0200 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-04-14 20:47:04 +0200 Started GET "/assets/adherent/icones/xls.png" for 127.0.0.1 at 2015-04-14 20:47:04 +0200 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-04-14 20:47:04 +0200 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-04-14 20:47:04 +0200 Started GET "/assets/back_disabled.png" for 127.0.0.1 at 2015-04-14 20:47:04 +0200 Started GET "/assets/forward_disabled.png" for 127.0.0.1 at 2015-04-14 20:47:04 +0200 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2015-04-14 20:47:05 +0200 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (5.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.2ms) BEGIN Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] SQL (1.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (120.5ms) COMMIT Redirected to http://127.0.0.1:39116/adherent/members Completed 302 Found in 150ms (ActiveRecord: 143.9ms) Started GET "/adherent/members" for 127.0.0.1 at 2015-04-14 20:47:05 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 15.8ms | ActiveRecord: 2.1ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_members"  (1.0ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (2.5ms) select table_name from information_schema.views where table_schema = 'adh_test'  (107.8ms) TRUNCATE TABLE "adherent_coords", "adherent_members", "adherent_adhesions", "organisms", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:47:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:47:06 UTC +00:00]]  (122.0ms) COMMIT Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.6ms) BEGIN Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:47:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:47:06 UTC +00:00]]  (25.2ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:47:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:47:06 UTC +00:00]]  (2.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:47:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:47:06 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:47:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:47:06 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:47:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Tue, 14 Apr 2015 18:47:06 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.4ms) BEGIN SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Tue, 14 Apr 2015 18:47:06 UTC +00:00], ["from_date", Tue, 14 Apr 2015], ["member_id", 1], ["to_date", Wed, 13 Apr 2016], ["updated_at", Tue, 14 Apr 2015 18:47:06 UTC +00:00]]  (1.5ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-04-14 20:47:06 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.9ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 11.1ms | ActiveRecord: 4.8ms) Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2015-04-14 20:47:07 +0200 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (11.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (120.8ms) COMMIT Redirected to http://127.0.0.1:39116/adherent/members/1/adhesions Completed 302 Found in 143ms (ActiveRecord: 136.3ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-04-14 20:47:07 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:39116/adherent/members/1/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 2.4ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2015-04-14 20:47:07 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.8ms) Completed 200 OK in 23ms (Views: 14.6ms | ActiveRecord: 4.2ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-04-14 20:47:07 +0200  (1.5ms) SELECT COUNT(*) FROM "adherent_adhesions"  (1.5ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (4.3ms) select table_name from information_schema.views where table_schema = 'adh_test'  (104.6ms) TRUNCATE TABLE "adherent_coords", "adherent_members", "adherent_adhesions", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL  (0.2ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 14 Apr 2015 18:47:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Tue, 14 Apr 2015 18:47:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 24ms (Views: 2.8ms | ActiveRecord: 4.5ms)  (0.3ms) ROLLBACK  (0.7ms) BEGIN  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Exists (170.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (507.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:19:35 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:19:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]]  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 1 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (80.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:19:36 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 1], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:19:36 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (59.5ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.8ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.6ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:19:36 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:19:36 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 2]]  (1.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 2 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:19:36 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 2], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:19:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:19:36 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:19:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 3]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 3 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:19:36 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 3], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:19:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 3 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (87.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:36 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 3], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:19:36 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:37 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 3], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:19:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:19:37 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:19:37 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 4]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 4 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:19:37 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 4], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:19:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 4 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:37 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 4], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:19:37 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:37 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 4], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:19:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SAVEPOINT active_record_1 SQL (74.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 4], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 4]] Adherent::Adhesion Load (92.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] SQL (31.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 3], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00], ["payment_id", 1], ["updated_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.2ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 5]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 5 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 5], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 5 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 5], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 5], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 5], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 5], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00], ["payment_id", 2], ["updated_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 5], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 5], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00], ["payment_id", 3], ["updated_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 6], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00], ["payment_id", 3], ["updated_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 5], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 6], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00], ["payment_id", 4], ["updated_at", Wed, 15 Apr 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (1.5ms) DELETE FROM "adherent_reglements" SQL (1.2ms) DELETE FROM "adherent_adhesions" SQL (1.6ms) DELETE FROM "adherent_payments" SQL (1.6ms) DELETE FROM "adherent_members" SQL (1.4ms) DELETE FROM "adherent_coords"  (0.9ms) ROLLBACK  (1.3ms) BEGIN  (1.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 6]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 6 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 6], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 6 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 6], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 6], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 6], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 6]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 6]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 7], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["payment_id", 5], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 6], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 6]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 6]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 7], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["payment_id", 6], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 8], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["payment_id", 6], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 7]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 7 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 7], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 7 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 7], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 7], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 7], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 9], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["payment_id", 7], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 7], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 9], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["payment_id", 8], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 10], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["payment_id", 8], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.2ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 8]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 8 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 8], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 8 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 8], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 8], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.7ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 9]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 9 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 9], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 9 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 9], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 9], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 10]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 10 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 10], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 10 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 10], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]] SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 10], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 11]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 11 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 11], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.2ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 12]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 12 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 12], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 13]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 13 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 13], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 13 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 13], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 13], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 14]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 14 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 14], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 14 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 14], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 14], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 15]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 15 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 15], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 15 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 15], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 15], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 15], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Adhesion Load (2.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 15]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 21], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["payment_id", 9], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 15], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 15]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 21], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["payment_id", 10], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 22], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["payment_id", 10], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 16]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 16 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 16], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 16 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 16], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 16], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 16], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 16]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 23], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["payment_id", 11], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 17]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 17 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 17], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 17 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 17], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 17], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.9ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 17], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 25], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["payment_id", 12], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 17], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 25], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["payment_id", 13], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 26], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["payment_id", 13], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 17], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 26], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["payment_id", 14], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 18]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 18 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 18], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 18 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 18], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 18], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 18], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 18]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 27], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["payment_id", 15], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 18], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 18]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 27], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["payment_id", 16], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 28], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["payment_id", 16], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 19]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 19 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 19], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 19 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 19], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 19], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 20]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 20 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 20], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 20 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 20], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 20], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:20:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 21]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 21 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 21], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 22]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 22 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 22], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 23]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 23 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 23], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 23 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 23], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 23], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 24]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 24 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 24], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 24 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 24], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 24], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 25]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 25 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 25], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 25 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 25], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 25], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 26]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 26 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 26], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 26 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 26], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 26], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 26], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 39], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["payment_id", 17], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 26], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 39], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["payment_id", 18], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 40]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 40], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["payment_id", 18], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 27]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 27 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 27], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 27 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 27], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 27], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 27], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 27]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 41]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 41], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["payment_id", 19], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 28]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 28 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 28], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 28 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 28], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 28], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 28], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 28]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 43]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 43], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["payment_id", 20], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 28], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 28]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 43]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 43], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["payment_id", 21], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 44]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 44], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["payment_id", 21], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 29]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 29 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 29], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 29 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 29], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 29], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 29], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 29]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 45], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["payment_id", 22], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 29], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 29]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 45], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["payment_id", 23], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 46], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["payment_id", 23], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 29], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 29]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 46], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["payment_id", 24], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 30]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 30 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 30], ["tel", "01.02.03.04.05"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 30 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 30], ["to_date", Sat, 31 Jan 2015], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 30], ["to_date", Sat, 28 Feb 2015], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (62.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (2.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (1.0ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (3.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 31]] Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 31]]  (0.6ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 31], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 31]] Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 2]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 31], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 31]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/31/payments" for 127.0.0.1 at 2015-04-15 07:40:33 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"31"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 31]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 25]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (24.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (2.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (25.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.7ms) Completed 200 OK in 70ms (Views: 62.9ms | ActiveRecord: 4.6ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 32]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 32]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 32], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 3]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 32], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:33 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 32]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/32/payments" for 127.0.0.1 at 2015-04-15 07:40:33 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"32"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "32"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 32]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.6ms | ActiveRecord: 3.9ms) Started GET "/adherent/payments/26/reglements/new" for 127.0.0.1 at 2015-04-15 07:40:33 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"26"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (79.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (84.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 97ms (Views: 88.0ms | ActiveRecord: 4.0ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 33]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 33]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 33], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/33/payments/new" for 127.0.0.1 at 2015-04-15 07:40:34 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"33"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "33"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 4]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 33]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (16.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (22.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 24.4ms | ActiveRecord: 2.1ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 33]] Started POST "/adherent/members/33/payments" for 127.0.0.1 at 2015-04-15 07:40:34 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"15/04/2015", "comment"=>"", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"33"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "33"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 4]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 33], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]] Adherent::Adhesion Load (0.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 33]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/33/payments Completed 302 Found in 17ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/33/payments" for 127.0.0.1 at 2015-04-15 07:40:34 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"33"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "33"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 33]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.8ms | ActiveRecord: 4.9ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 33]] SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 5], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 34]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 34]]  (0.6ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 34], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/34/payments/new" for 127.0.0.1 at 2015-04-15 07:40:34 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"34"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "34"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 5]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.9ms | ActiveRecord: 1.9ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 6], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 35]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 35]]  (1.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 35], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 6]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 35], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 35]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/35/payments/28" for 127.0.0.1 at 2015-04-15 07:40:34 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"35", "id"=>"28"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 28 LIMIT 1 [["member_id", 35]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (41.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (58.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 67ms (Views: 59.1ms | ActiveRecord: 4.9ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 7], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 36]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 36]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 36], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 7]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 36], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 36]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/36/payments/29" for 127.0.0.1 at 2015-04-15 07:40:34 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"36", "id"=>"29"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 29 LIMIT 1 [["member_id", 36]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (13.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.9ms | ActiveRecord: 4.1ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 8], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 37]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 37]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 37], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 8]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 37], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 37]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/37/payments/30" for 127.0.0.1 at 2015-04-15 07:40:34 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"37", "id"=>"30"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "37"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 30 LIMIT 1 [["member_id", 37]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (11.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.0ms | ActiveRecord: 3.5ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 9], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 38]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 38]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 38], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/38/payments/new" for 127.0.0.1 at 2015-04-15 07:40:34 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"38"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 9]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (12.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 15.0ms | ActiveRecord: 1.6ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 10], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 39]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 39]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 39], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/39/payments/new" for 127.0.0.1 at 2015-04-15 07:40:34 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"39"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "39"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 10]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 39]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (11.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.1ms | ActiveRecord: 1.7ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/allpayments/index.html.haml within layouts/adherent/application (0.5ms) Completed 200 OK in 61ms (Views: 2.9ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 12], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/40/coord/new" for 127.0.0.1 at 2015-04-15 07:40:34 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"40"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (10.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "40"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 40]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (19.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 39ms (Views: 23.9ms | ActiveRecord: 11.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/40/coord" for 127.0.0.1 at 2015-04-15 07:40:34 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"40"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "40"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 40]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 40], ["office", ""], ["tel", ""], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/40/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 3.5ms) Started GET "/adherent/members/40/adhesions/new" for 127.0.0.1 at 2015-04-15 07:40:34 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"40"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "40"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 40]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 40]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 16.5ms | ActiveRecord: 2.4ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 13], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/41/coord/new" for 127.0.0.1 at 2015-04-15 07:40:34 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"41"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 41]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 21.2ms | ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/42/coord/new" for 127.0.0.1 at 2015-04-15 07:40:34 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"42"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "42"]] Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 42]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 19.8ms | ActiveRecord: 1.3ms) Started POST "/adherent/members/42/coord" for 127.0.0.1 at 2015-04-15 07:40:34 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"42"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "42"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 42]]  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 42], ["office", ""], ["tel", ""], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/42/adhesions/new Completed 302 Found in 8ms (ActiveRecord: 3.0ms) Started GET "/adherent/members/42/adhesions/new" for 127.0.0.1 at 2015-04-15 07:40:34 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"42"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "42"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 42]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 42]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.9ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/43/coord/new" for 127.0.0.1 at 2015-04-15 07:40:34 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"43"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "43"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 43]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 20.1ms | ActiveRecord: 1.3ms) Started POST "/adherent/members/43/coord" for 127.0.0.1 at 2015-04-15 07:40:34 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"43"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "43"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 43]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 43], ["office", ""], ["tel", ""], ["updated_at", Wed, 15 Apr 2015 05:40:34 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/43/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 2.7ms) Started GET "/adherent/members/43/adhesions/new" for 127.0.0.1 at 2015-04-15 07:40:35 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"43"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "43"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 43]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 43]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 10.3ms | ActiveRecord: 1.8ms) Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 43]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 16], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 44], ["to_date", Fri, 15 May 2015], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/44/adhesions" for 127.0.0.1 at 2015-04-15 07:40:35 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"44"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "44"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 44]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 44]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 58]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 58]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.0ms | ActiveRecord: 2.6ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 17], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 45], ["to_date", Fri, 15 May 2015], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/45/adhesions" for 127.0.0.1 at 2015-04-15 07:40:35 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"45"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "45"]] Adherent::Adhesion Exists (0.3ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 45]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 45]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 12ms (Views: 6.8ms | ActiveRecord: 2.3ms) Started GET "/adherent/members/45/payments/new" for 127.0.0.1 at 2015-04-15 07:40:35 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"45"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "45"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 45]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.7ms | ActiveRecord: 2.2ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 46], ["to_date", Fri, 15 May 2015], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/46/adhesions" for 127.0.0.1 at 2015-04-15 07:40:35 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"46"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "46"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 46]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 46]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 12ms (Views: 6.9ms | ActiveRecord: 2.4ms) Started GET "/adherent/members/46/adhesions/60/edit" for 127.0.0.1 at 2015-04-15 07:40:35 +0200 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"46", "id"=>"60"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "46"]] Adherent::Adhesion Load (1.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 46], ["id", "60"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.5ms | ActiveRecord: 2.6ms) SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.1ms) BEGIN SQL (0.2ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/47/adhesions/new" for 127.0.0.1 at 2015-04-15 07:40:35 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"47"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 47]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 47]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 17ms (Views: 10.5ms | ActiveRecord: 1.7ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 47]] Started POST "/adherent/members/47/adhesions" for 127.0.0.1 at 2015-04-15 07:40:35 +0200 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"47"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 47], ["to_date", Thu, 31 Jul 2014], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/47/adhesions Completed 302 Found in 9ms (ActiveRecord: 1.8ms) Started GET "/adherent/members/47/adhesions" for 127.0.0.1 at 2015-04-15 07:40:35 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"47"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "47"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 47]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 47]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 61]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 61]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 9.1ms | ActiveRecord: 2.3ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 47]] SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/48/adhesions/new" for 127.0.0.1 at 2015-04-15 07:40:35 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"48"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "48"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 48]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 48]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 9.7ms | ActiveRecord: 1.6ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK SQL (1.1ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) BEGIN SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (3.0ms) COMMIT Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 21], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (2.6ms) COMMIT Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 21], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 21], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 21], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 49]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 49]]  (0.3ms) BEGIN SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 49], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:35 UTC +00:00]]  (1.8ms) COMMIT Started GET "/adherent/members/49/adhesions" for 127.0.0.1 at 2015-04-15 07:40:40 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"49"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "49"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 49]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 49]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 9.5ms | ActiveRecord: 9.9ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-04-15 07:40:40 +0200 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-04-15 07:40:40 +0200 Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-04-15 07:40:42 +0200 Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-04-15 07:40:42 +0200 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-04-15 07:40:42 +0200 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-04-15 07:40:42 +0200 Started DELETE "/adherent/members/49/adhesions/62" for 127.0.0.1 at 2015-04-15 07:40:43 +0200 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"49", "id"=>"62"} Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "49"]] Adherent::Adhesion Load (3.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 49], ["id", "62"]]  (0.2ms) BEGIN SQL (3.3ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 62]]  (102.0ms) COMMIT Redirected to http://127.0.0.1:35377/adherent/members/49/adhesions Completed 302 Found in 129ms (ActiveRecord: 122.1ms) Started GET "/adherent/members/49/adhesions" for 127.0.0.1 at 2015-04-15 07:40:43 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"49"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "49"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 49]] Redirected to http://127.0.0.1:35377/adherent/members/49/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.6ms) Started GET "/adherent/members/49/adhesions/new" for 127.0.0.1 at 2015-04-15 07:40:43 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"49"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "49"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 49]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 49]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 10.6ms | ActiveRecord: 2.5ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-04-15 07:40:44 +0200  (1.4ms) SELECT COUNT(*) FROM "adherent_adhesions"  (17.6ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (57.7ms) select table_name from information_schema.views where table_schema = 'adh_test'  (292.5ms) TRUNCATE TABLE "adherent_members", "adherent_adhesions", "adherent_coords", "adherent_reglements", "organisms", "adherent_payments" RESTART IDENTITY CASCADE;  (0.9ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (1.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:45 UTC +00:00]]  (2.1ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:45 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:45 UTC +00:00]]  (1.0ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:45 UTC +00:00]]  (1.0ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:45 UTC +00:00]]  (1.0ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:45 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-15 07:40:45 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 24.5ms | ActiveRecord: 2.9ms) Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-04-15 07:40:45 +0200 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-04-15 07:40:45 +0200 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-04-15 07:40:45 +0200 Started GET "/assets/adherent/icones/xls.png" for 127.0.0.1 at 2015-04-15 07:40:45 +0200 Started GET "/assets/adherent/icones/csv.png" for 127.0.0.1 at 2015-04-15 07:40:45 +0200 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-04-15 07:40:45 +0200 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-04-15 07:40:45 +0200 Started GET "/assets/forward_disabled.png" for 127.0.0.1 at 2015-04-15 07:40:45 +0200 Started GET "/assets/back_disabled.png" for 127.0.0.1 at 2015-04-15 07:40:45 +0200 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2015-04-15 07:40:46 +0200 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (2.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (8.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.2ms) BEGIN Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (3.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] SQL (0.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (55.6ms) COMMIT Redirected to http://127.0.0.1:35377/adherent/members Completed 302 Found in 84ms (ActiveRecord: 73.3ms) Started GET "/adherent/members" for 127.0.0.1 at 2015-04-15 07:40:46 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 13.0ms | ActiveRecord: 1.9ms)  (1.4ms) SELECT COUNT(*) FROM "adherent_members"  (3.7ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (4.7ms) select table_name from information_schema.views where table_schema = 'adh_test'  (259.7ms) TRUNCATE TABLE "adherent_members", "adherent_adhesions", "adherent_coords", "organisms", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (1.9ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:48 UTC +00:00]]  (129.2ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:48 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:48 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:48 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:48 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:48 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) BEGIN Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:48 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Wed, 15 Apr 2015 05:40:48 UTC +00:00]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (1.6ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-04-15 07:40:48 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 1]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.3ms | ActiveRecord: 5.6ms) Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-04-15 07:40:48 +0200 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-04-15 07:40:48 +0200 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-04-15 07:40:48 +0200 Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-04-15 07:40:49 +0200 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (6.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.3ms) BEGIN Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] SQL (2.2ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (145.6ms) COMMIT Redirected to http://127.0.0.1:35377/adherent/members/1/payments Completed 302 Found in 167ms (ActiveRecord: 156.0ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2015-04-15 07:40:49 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 16ms (Views: 6.4ms | ActiveRecord: 4.9ms)  (2.5ms) SELECT COUNT(*) FROM "adherent_payments"  (1.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (3.4ms) select table_name from information_schema.views where table_schema = 'adh_test'  (207.7ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (1.5ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL  (0.1ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 2;  Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 2.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as XLS Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.7ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 3; Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 3;  Sent data Mon association-15-avr-2015-Membres.xls (12.1ms) Completed 200 OK in 22ms (Views: 11.8ms | ActiveRecord: 5.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 4; Adherent::QueryMember Load (1.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 4;  Sent data Mon association-15-avr-2015-Membres.csv (0.7ms) Completed 200 OK in 14ms (Views: 0.5ms | ActiveRecord: 5.4ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.8ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.8ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 8], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/1/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 9], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/2/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 10], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/3/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.0ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.3ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"4"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 4 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 4 [["name", "Dalton"], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/4 Completed 302 Found in 11ms (ActiveRecord: 5.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"5"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/5 Completed 302 Found in 5ms (ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"6"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/6 Completed 302 Found in 5ms (ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"7"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.6ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x6049678 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (3.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 11ms (ActiveRecord: 5.3ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x6013640 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5fd788e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5f8f44e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5f43a94 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.3ms)  (0.6ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5f17da4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x5f1699a @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"15/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ee5a84 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5ee5a84%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"15/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5eb87c8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5eb87c8%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"15/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e8b5f2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 27], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 8], ["to_date", Fri, 15 May 2015], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 8]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 8]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["from_date", Sat, 16 May 2015], ["member_id", 8], ["to_date", Sun, 15 May 2016], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 27]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 9], ["to_date", Fri, 15 May 2015], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 9]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 9]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["from_date", Sat, 16 May 2015], ["member_id", 9], ["to_date", Sun, 15 May 2016], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 9]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 28]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 9], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] SQL (1.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 3], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["payment_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 4], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["payment_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 10], ["to_date", Fri, 15 May 2015], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 10]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 10]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["from_date", Sat, 16 May 2015], ["member_id", 10], ["to_date", Sun, 15 May 2016], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 10]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 10], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 10]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 5], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["payment_id", 2], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 11], ["to_date", Fri, 15 May 2015], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 11]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["from_date", Sat, 16 May 2015], ["member_id", 11], ["to_date", Sun, 15 May 2016], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 30]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (1.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 12], ["to_date", Fri, 15 May 2015], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 12]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 12]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["from_date", Sat, 16 May 2015], ["member_id", 12], ["to_date", Sun, 15 May 2016], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 12]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 31]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 12], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 12]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 9], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["payment_id", 3], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 10], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["payment_id", 3], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x6552a20 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6552aca%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x6520dea @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 3.4ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x646c6b0 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["member_id", 13], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["zip", 59000]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 13]]  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 1]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 13]] SQL (0.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 13]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 14]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 14]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 14], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 14]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 14]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 15]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 15]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 15], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 15]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 15]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 16]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 16]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 16], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 16]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 16]]  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 35], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 35], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 35], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 35], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 35], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-15 07:40:51 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.5ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 35; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (2.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.1ms) Completed 200 OK in 32ms (Views: 26.8ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 36], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 36], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 36], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 36], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 36) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 36) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 36], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-15 07:40:51 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 36; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 14.2ms | ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 37], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 37], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 37], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 37], ["updated_at", Wed, 15 Apr 2015 05:40:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 37) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 37], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 15.9ms | ActiveRecord: 0.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 37) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 37], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/35/coord/new Completed 302 Found in 9ms (ActiveRecord: 2.4ms) Started GET "/adherent/members/35/coord/new" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"35"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "35"]] Adherent::Coord Load (1.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 24.8ms | ActiveRecord: 3.1ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 38], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 38], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 38], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 38], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 38) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 38) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 38], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 38;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 14.3ms | ActiveRecord: 1.9ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/36/coord" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"36"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 36]] Redirected to http://www.example.com/adherent/members/36/coord/new Completed 302 Found in 5ms (ActiveRecord: 1.7ms) Started GET "/adherent/members/36/coord/new" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"36"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 36]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (24.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 27.1ms | ActiveRecord: 1.6ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 39], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 39], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 39], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 39], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 39], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 39; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 13.0ms | ActiveRecord: 2.1ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 41]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 41]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 41], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/41/adhesions" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"41"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 41]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 41]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.1ms | ActiveRecord: 3.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 40], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 40], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 40], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 40], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 40], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 40; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 14.4ms | ActiveRecord: 2.0ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/46/payments" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"46"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "46"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 46]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 9.3ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 41], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 41], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 41], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 41], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 41], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 41; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 14.3ms | ActiveRecord: 1.6ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["member_id", 51], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 51]] Started GET "/adherent/members/51/coord" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"51"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "51"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 51]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 11ms (Views: 7.3ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 42], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 42], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 42], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 42], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 42) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 42], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 42; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 14.7ms | ActiveRecord: 1.7ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/56/edit" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"56"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "56"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 15.4ms | ActiveRecord: 0.9ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 43], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 43], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 43], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 43], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 43) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 43) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 43], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 43;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 13.8ms | ActiveRecord: 1.6ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/61/adhesions" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"61"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "61"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 61]] Redirected to http://www.example.com/adherent/members/61/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.7ms) Started GET "/adherent/members/61/adhesions/new" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"61"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "61"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 61]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 61]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 15.9ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 44], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 44], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 44], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 44], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 44) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 44) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 44], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 44;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 22.0ms | ActiveRecord: 1.9ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 12.7ms | ActiveRecord: 0.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"15/04/2016", "from_date"=>"15/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x6481628 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6481628%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"15/04/2016", "from_date"=>"15/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x63f8d00 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x63f8d00%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"15/04/2016", "from_date"=>"15/04/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x6373984 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x650929e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x650929e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64e49c6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64b57b6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6489184 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x6429568 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6429568%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x63cdeb6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x63cdeb6%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x6399b7a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.8ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x6352928 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x631d0b6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62b859e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 58], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 58], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 58], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 71]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 71]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 71], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/71/payments/new" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"71"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 58]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 71]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (16.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 23.1ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/71/payments" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"15/04/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"71"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 71]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 58]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 71], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 71]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 15], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["payment_id", 4], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/71/payments Completed 302 Found in 17ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/71/payments" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"71"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 71]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 71]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 71]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (18.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 19.7ms | ActiveRecord: 5.4ms) Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 71]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 59], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 59], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 59], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 74]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 74]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 74], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/74/payments/new" for 127.0.0.1 at 2015-04-15 07:40:52 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"74"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "74"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 59]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 74]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.5ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/74/payments" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"15/04/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"74"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "74"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 74]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 59]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 74], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 74]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 16], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["payment_id", 5], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/74/payments Completed 302 Found in 19ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/74/payments" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"74"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "74"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 74]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 74]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 74]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.6ms | ActiveRecord: 5.1ms)  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 74]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 60], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 60], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 60], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 77]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 77]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 77], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/77/payments/new" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"77"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "77"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 60]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 77]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.4ms) Completed 200 OK in 22ms (Views: 14.1ms | ActiveRecord: 2.0ms) Started POST "/adherent/members/77/payments" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"15/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"77"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "77"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 77]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 60]] SQL (1.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 77], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 77]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 17], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["payment_id", 6], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/77/payments Completed 302 Found in 25ms (ActiveRecord: 5.7ms) Started GET "/adherent/members/77/payments" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"77"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "77"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 77]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 77]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 77]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.1ms | ActiveRecord: 4.3ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 61], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 61], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 61], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 80]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 80]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 80], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 80]] Started GET "/adherent/members/80/payments/new" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"80"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "80"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 61]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 80]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.7ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/80/payments" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"15/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"80"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "80"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 80]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 61]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 80], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 80]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 18], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["payment_id", 7], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/80/payments Completed 302 Found in 17ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/80/payments" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"80"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "80"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 80]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 80]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 80]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.1ms | ActiveRecord: 4.1ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 80]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 62], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 62], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 62], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 83]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 83]]  (0.6ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 83], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/83/payments/new" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"83"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "83"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 62]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 83]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.8ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/83/payments" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"15/04/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"83"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "83"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 83]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 62]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 83], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 83]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] SQL (1.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 19], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["payment_id", 8], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/83/payments Completed 302 Found in 17ms (ActiveRecord: 5.9ms) Started GET "/adherent/members/83/payments" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"83"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "83"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 83]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 83]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 83]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.6ms | ActiveRecord: 4.2ms)  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 83]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 63], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 63], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 63], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 86]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 86]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 86], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/86/payments/new" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"86"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "86"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 63]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 86]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.2ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/86/payments" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"15/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"86"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "86"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 86]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 63]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 86], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 86]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 20], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["payment_id", 9], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/86/payments Completed 302 Found in 16ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/86/payments" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"86"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "86"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 86]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 86]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 86]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.3ms | ActiveRecord: 4.3ms) Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 86]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 87]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 87]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 87], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 88]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 88]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 88], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/9/reglements/new" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"9"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 86]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 88]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 87]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (17.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 20.9ms | ActiveRecord: 5.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 64], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 64], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 64], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 89]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 89]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 89], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/89/payments/new" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"89"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "89"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 64]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 89]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.0ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/89/payments" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"15/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"89"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "89"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 89]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 64]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 89], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 89]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 23], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["payment_id", 10], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/89/payments Completed 302 Found in 16ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/89/payments" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"89"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "89"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 89]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 89]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (7.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 89]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (18.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 14.2ms | ActiveRecord: 11.2ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 89]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 90]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 90]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 90], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 91]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 91]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 91], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/10/reglements/new" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"10"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 89]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 91]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 90]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 17.5ms | ActiveRecord: 5.6ms) Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 89]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 89]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 65], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 65], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 65], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 92]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 92]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 92], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/92/payments/new" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"92"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "92"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 65]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 92]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.8ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/92/payments" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"15/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"92"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "92"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 92]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 65]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 92], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 92]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 26], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["payment_id", 11], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/92/payments Completed 302 Found in 18ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/92/payments" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"92"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "92"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 92]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 92]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 92]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.1ms | ActiveRecord: 4.1ms) Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 92]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 93]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 93]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 93], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 94]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 94]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 94], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/11/reglements/new" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"11"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 92]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 94]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 93]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 17.3ms | ActiveRecord: 6.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 66], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 66], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (2.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 66], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 95]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 95]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 95], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/95/payments/new" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"95"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "95"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 66]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 95]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.6ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/95/payments" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"15/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"95"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "95"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 95]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 66]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 95], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 95]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 29], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["payment_id", 12], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/95/payments Completed 302 Found in 16ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/95/payments" for 127.0.0.1 at 2015-04-15 07:40:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"95"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "95"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 95]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 95]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 95]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.9ms | ActiveRecord: 4.6ms) Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 95]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 96]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 96]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 96], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 97]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 97]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 97], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/12/reglements/new" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"12"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 95]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 96]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 97]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.3ms) Completed 200 OK in 26ms (Views: 16.0ms | ActiveRecord: 5.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 67], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 67], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 67], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 98]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 98]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 98], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/98/payments/new" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"98"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "98"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 67]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 98]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.8ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/98/payments" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"15/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"98"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "98"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 98]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 67]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 98], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 98]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 32], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["payment_id", 13], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/98/payments Completed 302 Found in 17ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/98/payments" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"98"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "98"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 98]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 98]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 98]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.2ms | ActiveRecord: 4.4ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 98]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 99]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 99]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 99], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 100]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 100]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 100], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/13/reglements/new" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"13"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 98]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 99]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 100]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (22.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 24.3ms | ActiveRecord: 5.3ms) Started POST "/adherent/payments/13/reglements" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"33"}, "commit"=>"Enregistrer", "payment_id"=>"13"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "33"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 33], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["payment_id", 13], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 98]] Redirected to http://www.example.com/adherent/members/98/payments Completed 302 Found in 12ms (ActiveRecord: 4.4ms) Started GET "/adherent/members/98/payments" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"98"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "98"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 98]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 98]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 99]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 98]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.0ms | ActiveRecord: 6.3ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 99]]  (0.7ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 68], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 68], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 68], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 101]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 101]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 101], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/101/payments/new" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"101"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "101"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 68]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 101]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.5ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/101/payments" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"15/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"101"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "101"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 101]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 68]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 101], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 101]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 35], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["payment_id", 14], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/101/payments Completed 302 Found in 17ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/101/payments" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"101"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "101"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 101]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 101]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 101]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.9ms | ActiveRecord: 3.9ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 101]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 102]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 102]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 102], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 103]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 103]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 103], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/14/reglements/new" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"14"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 101]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 102]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 103]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.5ms | ActiveRecord: 5.7ms) Started POST "/adherent/payments/14/reglements" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"36"}, "commit"=>"Enregistrer", "payment_id"=>"14"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 36], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["payment_id", 14], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 101]] Redirected to http://www.example.com/adherent/members/101/payments Completed 302 Found in 12ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/101/payments" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"101"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "101"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 101]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 101]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 102]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 101]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.6ms) Completed 200 OK in 23ms (Views: 15.9ms | ActiveRecord: 4.6ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 69], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 69], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 69], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 104]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 104]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 104], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/104/payments/new" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"104"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "104"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 69]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 104]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.9ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/104/payments" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"15/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"104"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "104"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 104]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 69]] SQL (1.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 104], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 104]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 38], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["payment_id", 15], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/104/payments Completed 302 Found in 17ms (ActiveRecord: 6.0ms) Started GET "/adherent/members/104/payments" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"104"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "104"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 104]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 104]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 104]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.3ms | ActiveRecord: 4.1ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 104]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 105]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 105]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 105], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 106]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 106]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 106], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/15/reglements/new" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"15"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 104]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 105]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 106]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 40]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.3ms | ActiveRecord: 5.6ms) Started POST "/adherent/payments/15/reglements" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"39"}, "commit"=>"Enregistrer", "payment_id"=>"15"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "39"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 39], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["payment_id", 15], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 104]] Redirected to http://www.example.com/adherent/members/104/payments Completed 302 Found in 11ms (ActiveRecord: 4.1ms) Started GET "/adherent/members/104/payments" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"104"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "104"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 104]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 38]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 104]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 39]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 105]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 104]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.1ms | ActiveRecord: 4.7ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 70], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 70], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 70], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 107]] Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 107]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 107], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/107/payments/new" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"107"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "107"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 70]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 107]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 41]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 13.6ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/107/payments" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"15/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"107"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "107"]]  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 107]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 70]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 107], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 107]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 41]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 41], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["payment_id", 16], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/107/payments Completed 302 Found in 16ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/107/payments" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"107"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "107"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 107]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 41]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 107]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 107]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.3ms | ActiveRecord: 3.7ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 107]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 108]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 108]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 108], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 109]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 109]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 109], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/16/reglements/new" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"16"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 107]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (1.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 108]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 42]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 109]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 43]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 15.8ms | ActiveRecord: 6.7ms) Started POST "/adherent/payments/16/reglements" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"42"}, "commit"=>"Enregistrer", "payment_id"=>"16"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "42"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 42]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 42], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["payment_id", 16], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 107]] Redirected to http://www.example.com/adherent/members/107/payments Completed 302 Found in 12ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/107/payments" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"107"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "107"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 107]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 41]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 107]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 42]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 108]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 107]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.9ms | ActiveRecord: 4.4ms) Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 108]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 42]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 71], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 71], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 71], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 110]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 110]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 110], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/110/payments/new" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"110"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "110"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 71]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 110]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 44]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.2ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/110/payments" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"15/04/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"110"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "110"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 110]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 71]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 110], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 110]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 44]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 44], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["payment_id", 17], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/110/payments Completed 302 Found in 16ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/110/payments" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"110"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "110"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 110]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 44]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 110]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 110]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 16.0ms | ActiveRecord: 4.1ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 110]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 111]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 111]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 111], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 112]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 112]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 112], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/17/reglements/new" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"17"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 110]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 112]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 111]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.7ms | ActiveRecord: 5.1ms) Started POST "/adherent/payments/17/reglements" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"45"}, "commit"=>"Enregistrer", "payment_id"=>"17"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "45"]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 45], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00], ["payment_id", 17], ["updated_at", Wed, 15 Apr 2015 05:40:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 110]] Redirected to http://www.example.com/adherent/members/110/payments Completed 302 Found in 12ms (ActiveRecord: 3.9ms) Started GET "/adherent/members/110/payments" for 127.0.0.1 at 2015-04-15 07:40:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"110"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "110"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 110]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 44]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 110]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 45]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 111]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 17]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 110]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.5ms | ActiveRecord: 4.9ms) Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 44]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 110]]  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 72) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 72) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 72], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 72) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 72) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 72], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 72) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 72) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 72], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 113]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 113]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 113], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/113/payments/new" for 127.0.0.1 at 2015-04-15 07:40:55 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"113"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "113"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 72]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 113]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 47]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.2ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/113/payments" for 127.0.0.1 at 2015-04-15 07:40:55 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"15/04/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"113"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "113"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 113]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 72]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 113], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 113]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 47]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 47], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["payment_id", 18], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/113/payments Completed 302 Found in 18ms (ActiveRecord: 3.9ms) Started GET "/adherent/members/113/payments" for 127.0.0.1 at 2015-04-15 07:40:55 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"113"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "113"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 113]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 47]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 113]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 18]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 113]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.1ms | ActiveRecord: 4.1ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 113]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 47]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.6ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 73) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 73) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 73], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 73) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 73) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 73], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 73) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 73) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 73], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 116]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 116]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 116], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/116/payments/new" for 127.0.0.1 at 2015-04-15 07:40:55 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"116"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "116"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 73]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 116]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.4ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/116/payments" for 127.0.0.1 at 2015-04-15 07:40:55 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"15/04/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"116"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "116"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 116]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 73]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 116], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 116]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 48], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["payment_id", 19], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/116/payments Completed 302 Found in 18ms (ActiveRecord: 4.2ms) Started GET "/adherent/members/116/payments" for 127.0.0.1 at 2015-04-15 07:40:55 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"116"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "116"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 116]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 48]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 116]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 19]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 116]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.4ms | ActiveRecord: 3.7ms)  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 116]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 74) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 74) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 74], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 74) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 74) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 74], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 119], ["to_date", Sat, 31 Aug 2013], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 120], ["to_date", Sat, 31 Aug 2013], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 74]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 120], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 120]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 50]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 50], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["payment_id", 20], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 119]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 74]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 119], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 119]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 49]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 49], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["payment_id", 21], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 75) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 75) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 75], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 75) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 75) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 75], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 121], ["to_date", Sat, 31 Aug 2013], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 122], ["to_date", Sat, 31 Aug 2013], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 122]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 75]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 122], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 122]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 52]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 52], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["payment_id", 22], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 76) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 76) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 76], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 76) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 76) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 76], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 123], ["to_date", Sat, 31 Aug 2013], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 124], ["to_date", Sat, 31 Aug 2013], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 124]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 76]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 124], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 124]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 54]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 54], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["payment_id", 23], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 124]] Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 76]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 124], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 124]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 54]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 54], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["payment_id", 24], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 76]] SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["date", Wed, 15 Apr 2015], ["member_id", 123], ["mode", "CB"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 123]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 53]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 53], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["payment_id", 25], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 1], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["payment_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 1], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 56]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 56], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["payment_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 56]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["from_date", Wed, 15 Apr 2015], ["member_id", 1], ["to_date", Thu, 14 Apr 2016], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 57]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 57], ["amount", #], ["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["payment_id", 1], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ee5494 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ebca6c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5ebca6c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e8a134 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5b231c6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5a92432 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5a40812 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5a40812%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x59d0b7a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x59d0b7a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x597c548 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.5ms | ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x593b674 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x58d8812 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x58720d0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Wed, 15 Apr 2015 05:40:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK ActiveRecord::SchemaMigration Load (27.7ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (1.2ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateQueryMember (20150412145762)  (0.5ms) BEGIN  (132.3ms) DROP VIEW IF EXISTS adherent_query_members SQL (25.4ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '20150412145762'  (6.8ms) COMMIT ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.4ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5375690 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (15.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (78.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5375690%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 119ms (ActiveRecord: 98.1ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x4aac004 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 8.9ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e7d1f0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5e7d1f0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 1.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5e97a14 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.4ms | ActiveRecord: 1.8ms)  (1.0ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5eb1bf8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x5eb0f6e @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.8ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5eca9a0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.0ms | ActiveRecord: 1.6ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ede216 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"09/05/2016", "from_date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x4a23754 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x4a23754%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"09/05/2016", "from_date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5f20f58 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 3.6ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"09/05/2016", "from_date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5f6ba6c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5f6ba6c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5f85ce6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.7ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5f99552 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5fad55c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5fc391a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5fd4422 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5fd4422%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5fee8b8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x6007552 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6007552%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x601a12a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x601a12a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6033800 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.4ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6047526 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 30ms (Views: 2.7ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.5ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 109) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 109) LIMIT 1 SQL (51.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 109], ["updated_at", Sat, 09 May 2015 11:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/125/coord/new" for 127.0.0.1 at 2015-05-09 13:15:52 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"125"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "125"]] Adherent::Coord Load (15.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 125]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (51.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (23.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.9ms) Completed 200 OK in 135ms (Views: 95.0ms | ActiveRecord: 20.4ms) Started POST "/adherent/members/125/coord" for 127.0.0.1 at 2015-05-09 13:15:52 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"125"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "125"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 125]]  (0.3ms) SAVEPOINT active_record_1 SQL (36.3ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 125], ["office", ""], ["tel", ""], ["updated_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/125/adhesions/new Completed 302 Found in 46ms (ActiveRecord: 38.4ms) Started GET "/adherent/members/125/adhesions/new" for 127.0.0.1 at 2015-05-09 13:15:52 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"125"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "125"]] Adherent::Adhesion Load (8.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 125]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 125]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 16.1ms | ActiveRecord: 10.6ms) Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 125]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 110) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 110) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 110], ["updated_at", Sat, 09 May 2015 11:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/126/coord/new" for 127.0.0.1 at 2015-05-09 13:15:52 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"126"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "126"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 126]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 20.8ms | ActiveRecord: 2.1ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/126/coord" for 127.0.0.1 at 2015-05-09 13:15:52 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"126"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "126"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 126]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 126], ["office", ""], ["tel", ""], ["updated_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/126/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 2.8ms) Started GET "/adherent/members/126/adhesions/new" for 127.0.0.1 at 2015-05-09 13:15:52 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"126"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "126"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 126]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 126]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.8ms | ActiveRecord: 2.1ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 111) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 111) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 111], ["updated_at", Sat, 09 May 2015 11:15:52 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/127/coord/new" for 127.0.0.1 at 2015-05-09 13:15:52 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"127"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "127"]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 127]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (23.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 28.6ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/127/coord" for 127.0.0.1 at 2015-05-09 13:15:52 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"127"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "127"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 127]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 127], ["office", ""], ["tel", ""], ["updated_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/127/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 2.9ms) Started GET "/adherent/members/127/adhesions/new" for 127.0.0.1 at 2015-05-09 13:15:52 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"127"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "127"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 127]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 127]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (12.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.7ms | ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 112) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 112) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 112], ["updated_at", Sat, 09 May 2015 11:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/128/coord/new" for 127.0.0.1 at 2015-05-09 13:15:52 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"128"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "128"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 128]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (26.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 38ms (Views: 30.8ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 113) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 113) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 113], ["updated_at", Sat, 09 May 2015 11:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 113) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 113) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 113], ["updated_at", Sat, 09 May 2015 11:15:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 113) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 113) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 113], ["updated_at", Sat, 09 May 2015 11:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 129]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 129]]  (0.3ms) SAVEPOINT active_record_1 SQL (48.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 129], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/129/payments/new" for 127.0.0.1 at 2015-05-09 13:15:52 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"129"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "129"]] Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 113]] Adherent::Adhesion Load (13.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 129]]  (7.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 58]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (16.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 72ms (Views: 24.4ms | ActiveRecord: 25.6ms) Started POST "/adherent/members/129/payments" for 127.0.0.1 at 2015-05-09 13:15:52 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"129"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "129"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 113]] SQL (51.3ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:15:52 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 129], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:15:52 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 129]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 58]] SQL (40.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 58], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["payment_id", 26], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/129/payments Completed 302 Found in 123ms (ActiveRecord: 95.6ms) Started GET "/adherent/members/129/payments" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"129"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "129"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 129]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 58]] Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 26]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (19.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 24.9ms | ActiveRecord: 6.7ms) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 129]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 58]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 114) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 114) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 114], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 114) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 114) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 114], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 114) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 114) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 114], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 132]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 132]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 132], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/132/payments/new" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"132"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 114]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 132]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.1ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/132/payments" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"132"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 114]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 132], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 132]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 59], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["payment_id", 27], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/132/payments Completed 302 Found in 22ms (ActiveRecord: 5.9ms) Started GET "/adherent/members/132/payments" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"132"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 132]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 59]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 16.4ms | ActiveRecord: 5.5ms)  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 132]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 115) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 115) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 115], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 115) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 115) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 115], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 115) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 115) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 115], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 135]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 135]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 135], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/135/payments/new" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"135"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "135"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 115]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 135]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 12.6ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/135/payments" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"135"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "135"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 135]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 115]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 135], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 135]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 60], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["payment_id", 28], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/135/payments Completed 302 Found in 18ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/135/payments" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"135"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "135"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 135]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 60]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 135]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 135]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.3ms | ActiveRecord: 5.0ms) Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 135]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 28]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 116) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 116) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 116], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 116) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 116) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 116], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 116) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 116) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 116], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 138]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 138]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 138], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/138/payments/new" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"138"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "138"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 116]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 138]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 61]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 12.4ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/138/payments" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"138"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "138"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 116]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 138], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 138]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 61]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 61], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["payment_id", 29], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/138/payments Completed 302 Found in 17ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/138/payments" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"138"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "138"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 138]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 61]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 29]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.1ms | ActiveRecord: 4.8ms)  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 138]]  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 117) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 117) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 117], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 117) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 117) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 117], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 117) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 117) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 117], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 141]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 141]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 141], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/141/payments/new" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"141"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "141"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 117]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 141]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.2ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/141/payments" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"141"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "141"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 117]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 141], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 141]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 62], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["payment_id", 30], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/141/payments Completed 302 Found in 19ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/141/payments" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"141"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "141"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 141]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 62]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] CACHE (0.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 20.2ms | ActiveRecord: 5.1ms) Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 141]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 142]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 142]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 142], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 143]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 143]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 143], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/30/reglements/new" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"30"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "30"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 30]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 143]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 64]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 63]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (20.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 46ms (Views: 30.4ms | ActiveRecord: 7.2ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 118) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 118) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 118], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 118) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 118) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 118], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 118) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 118) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 118], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 144]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 144]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 144], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/144/payments/new" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"144"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "144"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 118]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 144]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.9ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/144/payments" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"144"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "144"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 144]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 118]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 144], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 144]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 65], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["payment_id", 31], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/144/payments Completed 302 Found in 17ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/144/payments" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"144"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "144"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 144]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 65]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 144]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 144]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.1ms | ActiveRecord: 4.3ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 144]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 145]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 145]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 145], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 146]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 146]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 146], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/31/reglements/new" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"31"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "31"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 144]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 31]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 146]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 67]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 145]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 66]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.2ms | ActiveRecord: 5.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 119) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 119) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 119], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 119) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 119) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 119], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 119) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 119) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 119], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 147]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 147]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 147], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/147/payments/new" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"147"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "147"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 119]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 147]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 68]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.5ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/147/payments" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"147"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "147"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 147]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 119]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 147], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 147]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 68]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 68], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["payment_id", 32], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/147/payments Completed 302 Found in 17ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/147/payments" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"147"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "147"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 147]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 68]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 147]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 147]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.1ms | ActiveRecord: 3.8ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 147]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 148]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 148]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 148], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 149]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 149]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:53 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 149], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/32/reglements/new" for 127.0.0.1 at 2015-05-09 13:15:53 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"32"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "32"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 147]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 148]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 69]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 149]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 70]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 17.9ms | ActiveRecord: 5.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 120) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 120) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 120], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 120) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 120) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 120], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 120) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 120) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 120], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 150]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 150]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 150], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/150/payments/new" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"150"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "150"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 120]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 150]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.0ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/150/payments" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"150"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "150"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 150]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 120]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 150], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 150]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 71], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["payment_id", 33], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/150/payments Completed 302 Found in 19ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/150/payments" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"150"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "150"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 150]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 71]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 150]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 150]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 16.0ms | ActiveRecord: 4.5ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 150]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 151]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 151]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 151], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 152]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 152]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 152], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/33/reglements/new" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"33"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "33"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 150]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 151]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 72]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 152]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 73]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 17.8ms | ActiveRecord: 5.4ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 150]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 150]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 121) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 121) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 121], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 121) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 121) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 121], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 121) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 121) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 121], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 153]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 153]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 153], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/153/payments/new" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"153"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "153"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 121]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 153]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 74]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 17.7ms | ActiveRecord: 2.4ms) Started POST "/adherent/members/153/payments" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"153"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "153"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 153]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 121]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 153], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 153]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 74]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 74], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["payment_id", 34], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/153/payments Completed 302 Found in 25ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/153/payments" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"153"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "153"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 153]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 74]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 153]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 153]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 16.3ms | ActiveRecord: 4.5ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 153]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 154]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 154]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 154], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 155]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 155]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 155], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/34/reglements/new" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"34"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "34"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 153]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 155]]  (1.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 76]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 75]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (18.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 36ms (Views: 21.4ms | ActiveRecord: 6.7ms) Started POST "/adherent/payments/34/reglements" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"75"}, "commit"=>"Enregistrer", "payment_id"=>"34"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "34"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "75"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 75]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 75], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["payment_id", 34], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 153]] Redirected to http://www.example.com/adherent/members/153/payments Completed 302 Found in 12ms (ActiveRecord: 4.0ms) Started GET "/adherent/members/153/payments" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"153"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "153"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 153]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 74]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 153]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 75]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 153]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 17.1ms | ActiveRecord: 5.0ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 75]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 154]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 122) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 122) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 122], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 122) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 122) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 122], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 122) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 122) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 122], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 156]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 156]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 156], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/156/payments/new" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"156"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "156"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 122]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 156]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 77]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 15.3ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/156/payments" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"156"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "156"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 156]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 122]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 156], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 156]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 77]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 77], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["payment_id", 35], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/156/payments Completed 302 Found in 25ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/156/payments" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"156"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "156"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 156]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 77]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 156]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]]  (1.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 156]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (20.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 21.2ms | ActiveRecord: 6.8ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 156]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 157]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 157]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 157], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 158]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 158]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 158], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/35/reglements/new" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"35"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "35"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 156]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 158]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 79]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 78]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (20.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 23.2ms | ActiveRecord: 5.3ms) Started POST "/adherent/payments/35/reglements" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"78"}, "commit"=>"Enregistrer", "payment_id"=>"35"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "35"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "78"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 78]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 78], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["payment_id", 35], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 156]] Redirected to http://www.example.com/adherent/members/156/payments Completed 302 Found in 12ms (ActiveRecord: 3.9ms) Started GET "/adherent/members/156/payments" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"156"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "156"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 156]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 77]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 156]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 78]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 156]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.5ms | ActiveRecord: 5.6ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 77]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 156]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 123) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 123) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 123], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 123) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 123) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 123], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 123) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 123) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 123], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 159]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 159]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 159], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/159/payments/new" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"159"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "159"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 123]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 159]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 80]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 13.0ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/159/payments" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"159"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "159"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 123]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 159], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 159]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 80]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 80], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["payment_id", 36], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/159/payments Completed 302 Found in 17ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/159/payments" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"159"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "159"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 159]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 80]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 16.0ms | ActiveRecord: 4.0ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 159]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 160]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 160]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 160], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 161]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 161]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 161], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/36/reglements/new" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"36"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 161]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 82]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 160]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 81]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 16.3ms | ActiveRecord: 6.0ms) Started POST "/adherent/payments/36/reglements" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"81"}, "commit"=>"Enregistrer", "payment_id"=>"36"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "81"]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 81]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 81], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["payment_id", 36], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Redirected to http://www.example.com/adherent/members/159/payments Completed 302 Found in 17ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/159/payments" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"159"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "159"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 159]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 80]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 81]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 160]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 19.4ms | ActiveRecord: 4.9ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 124) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 124) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 124], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 124) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 124) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 124], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 124) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 124) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 124], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 162]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 162]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:54 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 162], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:54 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/162/payments/new" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"162"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "162"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 124]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 162]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 83]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.9ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/162/payments" for 127.0.0.1 at 2015-05-09 13:15:54 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"162"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "162"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 162]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 124]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 162], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 162]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 83]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 83], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["payment_id", 37], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/162/payments Completed 302 Found in 21ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/162/payments" for 127.0.0.1 at 2015-05-09 13:15:55 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"162"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "162"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 162]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 83]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 162]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 162]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 14.0ms | ActiveRecord: 3.9ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 162]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 163]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 163]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 163], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 164]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 164]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 164], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/37/reglements/new" for 127.0.0.1 at 2015-05-09 13:15:55 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"37"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "37"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 162]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 163]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 84]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 164]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 85]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 15.9ms | ActiveRecord: 5.6ms) Started POST "/adherent/payments/37/reglements" for 127.0.0.1 at 2015-05-09 13:15:55 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"84"}, "commit"=>"Enregistrer", "payment_id"=>"37"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "37"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "84"]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 84]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 84], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["payment_id", 37], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 162]] Redirected to http://www.example.com/adherent/members/162/payments Completed 302 Found in 15ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/162/payments" for 127.0.0.1 at 2015-05-09 13:15:55 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"162"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "162"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 162]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 83]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 162]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 84]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 163]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 162]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (17.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 17.6ms | ActiveRecord: 5.4ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 163]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 84]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 125) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 125) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 125], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 125) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 125) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 125], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 125) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 125) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 125], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 165]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 165]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 165], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/165/payments/new" for 127.0.0.1 at 2015-05-09 13:15:55 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"165"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "165"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 125]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 165]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 86]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.5ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/165/payments" for 127.0.0.1 at 2015-05-09 13:15:55 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"165"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "165"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 165]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 125]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 165], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 165]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 86]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 86], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["payment_id", 38], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/165/payments Completed 302 Found in 16ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/165/payments" for 127.0.0.1 at 2015-05-09 13:15:55 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"165"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "165"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 165]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 86]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 165]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 165]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.9ms | ActiveRecord: 4.5ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 165]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 166]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 166]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 166], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 167]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 167]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 167], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/38/reglements/new" for 127.0.0.1 at 2015-05-09 13:15:55 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"38"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 165]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 166]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 87]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 167]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 88]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.5ms | ActiveRecord: 5.9ms) Started POST "/adherent/payments/38/reglements" for 127.0.0.1 at 2015-05-09 13:15:55 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"87"}, "commit"=>"Enregistrer", "payment_id"=>"38"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "87"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 87]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 87], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["payment_id", 38], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 165]] Redirected to http://www.example.com/adherent/members/165/payments Completed 302 Found in 17ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/165/payments" for 127.0.0.1 at 2015-05-09 13:15:55 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"165"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "165"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 165]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 86]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 165]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 87]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 166]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 165]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.0ms | ActiveRecord: 4.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 126) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 126) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 126], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 126) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 126) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 126], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 126) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 126) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 126], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 168]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 168]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 168], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/168/payments/new" for 127.0.0.1 at 2015-05-09 13:15:55 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"168"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "168"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 126]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 168]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 89]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.9ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/168/payments" for 127.0.0.1 at 2015-05-09 13:15:55 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"168"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "168"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 168]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 126]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 168], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 168]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 89]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 89], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["payment_id", 39], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/168/payments Completed 302 Found in 20ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/168/payments" for 127.0.0.1 at 2015-05-09 13:15:55 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"168"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "168"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 168]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 89]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 168]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 168]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.6ms | ActiveRecord: 3.8ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 127) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 127) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 127], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 127) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 127) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 127], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 127) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 127) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 127], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 171]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 171]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 171], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/171/payments/new" for 127.0.0.1 at 2015-05-09 13:15:55 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"171"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "171"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 127]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 171]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 90]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.9ms | ActiveRecord: 2.8ms) Started POST "/adherent/members/171/payments" for 127.0.0.1 at 2015-05-09 13:15:55 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"171"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "171"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 171]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 127]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 171], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 171]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 90]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 90], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["payment_id", 40], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/171/payments Completed 302 Found in 21ms (ActiveRecord: 6.0ms) Started GET "/adherent/members/171/payments" for 127.0.0.1 at 2015-05-09 13:15:55 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"171"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "171"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 171]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 90]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 171]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 171]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 13.4ms | ActiveRecord: 4.0ms)  (0.9ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 171]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 128) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 128) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 128], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 128) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 128) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 128], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 128) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 128) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 128], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 174]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 174]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 174], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 174]] Started GET "/adherent/members/174/payments/new" for 127.0.0.1 at 2015-05-09 13:15:55 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"174"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "174"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 128]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 174]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 91]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.0ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/174/payments" for 127.0.0.1 at 2015-05-09 13:15:55 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"174"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "174"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 174]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 128]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 174], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 174]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 91]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 91], ["amount", #], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["payment_id", 41], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/174/payments Completed 302 Found in 18ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/174/payments" for 127.0.0.1 at 2015-05-09 13:15:55 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"174"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "174"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 174]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 91]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 174]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 174]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 15.9ms | ActiveRecord: 4.2ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 174]]  (0.3ms) ROLLBACK SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (28.5ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 129) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 129) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 129], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 129) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 129) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 129], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 129) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 129) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 129], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 129) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 129) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 129], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 129) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 129) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 129], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 177]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 177]]  (0.2ms) BEGIN SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:15:55 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 177], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:15:55 UTC +00:00]]  (1.0ms) COMMIT Started GET "/adherent/members/177/adhesions" for 127.0.0.1 at 2015-05-09 13:16:00 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"177"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "177"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 177]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 177]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 92]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 92]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 36ms (Views: 17.4ms | ActiveRecord: 10.6ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-05-09 13:16:00 +0200 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-05-09 13:16:00 +0200 Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-05-09 13:16:02 +0200 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-05-09 13:16:02 +0200 Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-05-09 13:16:02 +0200 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-05-09 13:16:02 +0200 Started DELETE "/adherent/members/177/adhesions/92" for 127.0.0.1 at 2015-05-09 13:16:03 +0200 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"177", "id"=>"92"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "177"]] Adherent::Adhesion Load (5.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 177], ["id", "92"]]  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 92]]  (98.1ms) COMMIT Redirected to http://127.0.0.1:40398/adherent/members/177/adhesions Completed 302 Found in 118ms (ActiveRecord: 106.8ms) Started GET "/adherent/members/177/adhesions" for 127.0.0.1 at 2015-05-09 13:16:03 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"177"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "177"]] Adherent::Adhesion Exists (1.0ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 177]] Redirected to http://127.0.0.1:40398/adherent/members/177/adhesions/new Completed 302 Found in 15ms (ActiveRecord: 10.5ms) Started GET "/adherent/members/177/adhesions/new" for 127.0.0.1 at 2015-05-09 13:16:03 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"177"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "177"]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 177]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 177]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 12.7ms | ActiveRecord: 10.3ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-05-09 13:16:04 +0200  (0.7ms) SELECT COUNT(*) FROM "adherent_adhesions"  (7.2ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (65.8ms) select table_name from information_schema.views where table_schema = 'adh_test'  (223.1ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_reglements", "organisms", "adherent_payments" RESTART IDENTITY CASCADE;  (0.9ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:05 UTC +00:00]]  (99.9ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:05 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:05 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:05 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:05 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:05 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) BEGIN Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:05 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Sat, 09 May 2015 11:16:05 UTC +00:00]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (1.3ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-05-09 13:16:05 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 1]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (23.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 61ms (Views: 42.3ms | ActiveRecord: 12.5ms) Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-05-09 13:16:05 +0200 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-05-09 13:16:05 +0200 Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-05-09 13:16:05 +0200 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-05-09 13:16:05 +0200 Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-05-09 13:16:06 +0200 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (2.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.8ms) BEGIN Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] SQL (0.5ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (126.9ms) COMMIT Redirected to http://127.0.0.1:40398/adherent/members/1/payments Completed 302 Found in 160ms (ActiveRecord: 144.5ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2015-05-09 13:16:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Rendered collection (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 7.1ms | ActiveRecord: 13.0ms)  (0.8ms) SELECT COUNT(*) FROM "adherent_payments"  (0.6ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (1.5ms) select table_name from information_schema.views where table_schema = 'adh_test'  (140.3ms) TRUNCATE TABLE "adherent_coords", "adherent_members", "adherent_adhesions", "organisms", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (1.4ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:07 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:07 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.9ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:07 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (1.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:07 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:07 UTC +00:00]]  (0.9ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:07 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:07 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:16:07 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 74ms (Views: 53.6ms | ActiveRecord: 4.2ms) Started GET "/assets/adherent/icones/csv.png" for 127.0.0.1 at 2015-05-09 13:16:08 +0200 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-05-09 13:16:08 +0200 Started GET "/assets/adherent/icones/xls.png" for 127.0.0.1 at 2015-05-09 13:16:08 +0200 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-05-09 13:16:08 +0200 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-05-09 13:16:08 +0200 Started GET "/assets/forward_disabled.png" for 127.0.0.1 at 2015-05-09 13:16:08 +0200 Started GET "/assets/back_disabled.png" for 127.0.0.1 at 2015-05-09 13:16:08 +0200 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-05-09 13:16:08 +0200 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2015-05-09 13:16:09 +0200 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (4.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (7.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.2ms) BEGIN Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] SQL (3.0ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (64.9ms) COMMIT Redirected to http://127.0.0.1:40398/adherent/members Completed 302 Found in 97ms (ActiveRecord: 82.7ms) Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:16:09 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 19.7ms | ActiveRecord: 2.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members"  (0.9ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (3.6ms) select table_name from information_schema.views where table_schema = 'adh_test'  (244.2ms) TRUNCATE TABLE "adherent_coords", "adherent_members", "adherent_adhesions", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:10 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 11:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-05-09 13:16:10 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 14.4ms | ActiveRecord: 5.9ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Sat, 09 May 2015 11:16:10 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:10 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 2], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 11:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/2/adhesions" for 127.0.0.1 at 2015-05-09 13:16:10 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"2"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 2]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 2]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.6ms | ActiveRecord: 3.0ms) Started GET "/adherent/members/2/payments/new" for 127.0.0.1 at 2015-05-09 13:16:10 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"2"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 2]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.4ms | ActiveRecord: 2.7ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Sat, 09 May 2015 11:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:10 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 3], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 11:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/3/adhesions" for 127.0.0.1 at 2015-05-09 13:16:10 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"3"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Adhesion Exists (0.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 3]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 3]]  (1.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 10.7ms | ActiveRecord: 4.4ms) Started GET "/adherent/members/3/adhesions/3/edit" for 127.0.0.1 at 2015-05-09 13:16:10 +0200 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"3", "id"=>"3"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 3], ["id", "3"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.3ms) Completed 200 OK in 19ms (Views: 13.8ms | ActiveRecord: 1.8ms) SQL (0.8ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:10 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:10 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Sat, 09 May 2015 11:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/4/adhesions/new" for 127.0.0.1 at 2015-05-09 13:16:10 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 12.9ms | ActiveRecord: 2.6ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]] Started POST "/adherent/members/4/adhesions" for 127.0.0.1 at 2015-05-09 13:16:10 +0200 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 4], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/4/adhesions Completed 302 Found in 10ms (ActiveRecord: 2.9ms) Started GET "/adherent/members/4/adhesions" for 127.0.0.1 at 2015-05-09 13:16:11 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"4"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 4]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 12.0ms | ActiveRecord: 2.9ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]] SQL (0.7ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 5], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/5/adhesions/new" for 127.0.0.1 at 2015-05-09 13:16:11 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"5"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Adhesion Load (1.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (18.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 21.5ms | ActiveRecord: 3.9ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x6038d14 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 3.7ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ffe484 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5ffe484%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5fb4fe6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.7ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5f7afa8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (1.0ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5ee5d2c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5e5b17c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x60c45e4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x60c45e4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 7ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6081410 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x605d074 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.7ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x605d074%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 7ms (ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x601a166 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5fd0930 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 6]] Adherent::Adhesion Load (1.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 6]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 6], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 6]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 6]]  (1.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 7]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 7]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 7], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 7]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 7]]  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (2.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 8]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 8]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 8], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 8]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 8]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.9ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x5c613da @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5c61420%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5c0f990 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.4ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5ba91ea @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 12]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 12]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 12], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/12/payments/new" for 127.0.0.1 at 2015-05-09 13:16:11 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"12"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "12"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 12]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (16.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (3.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (3.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.2ms) Completed 200 OK in 47ms (Views: 38.7ms | ActiveRecord: 2.6ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 13]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 13]]  (0.8ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 13], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/13/payments/new" for 127.0.0.1 at 2015-05-09 13:16:11 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"13"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]] Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 21]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 15.9ms | ActiveRecord: 4.8ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 14]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 14]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 14], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] SQL (1.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 14], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]] Adherent::Adhesion Load (2.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/14/payments" for 127.0.0.1 at 2015-05-09 13:16:11 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"14"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 14]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 21.8ms | ActiveRecord: 6.2ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 15]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 15]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 15], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 23]] SQL (1.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 15], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 15]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/15/payments" for 127.0.0.1 at 2015-05-09 13:16:11 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"15"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 15]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.0ms | ActiveRecord: 4.5ms) Started GET "/adherent/payments/2/reglements/new" for 127.0.0.1 at 2015-05-09 13:16:11 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"2"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (22.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 38ms (Views: 27.6ms | ActiveRecord: 4.5ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 16]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 16]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 16], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 24]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 16], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 16]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/16/payments/3" for 127.0.0.1 at 2015-05-09 13:16:11 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"16", "id"=>"3"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 3 LIMIT 1 [["member_id", 16]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (6.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 23.8ms | ActiveRecord: 4.7ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.7ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 17]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 17]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 17], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 25]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:11 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 17], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:11 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/17/payments/4" for 127.0.0.1 at 2015-05-09 13:16:11 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"17", "id"=>"4"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 4 LIMIT 1 [["member_id", 17]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 16.5ms | ActiveRecord: 5.5ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.6ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 18]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 18]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 18], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 18]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 26]] SQL (1.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 18], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 18]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/18/payments/5" for 127.0.0.1 at 2015-05-09 13:16:12 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"18", "id"=>"5"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "18"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 5 LIMIT 1 [["member_id", 18]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 18]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.9ms | ActiveRecord: 5.5ms) SQL (0.9ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 27], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 19]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 19]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 19], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/19/payments/new" for 127.0.0.1 at 2015-05-09 13:16:12 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"19"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "19"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 27]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 12.1ms | ActiveRecord: 2.5ms)  (1.0ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 19]] Started POST "/adherent/members/19/payments" for 127.0.0.1 at 2015-05-09 13:16:12 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"19"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "19"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 27]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 19], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 19]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/19/payments Completed 302 Found in 16ms (ActiveRecord: 4.2ms) Started GET "/adherent/members/19/payments" for 127.0.0.1 at 2015-05-09 13:16:12 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"19"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "19"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 19]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.2ms | ActiveRecord: 4.0ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 19]] SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 20]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 20]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 20], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/20/payments/new" for 127.0.0.1 at 2015-05-09 13:16:12 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"20"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "20"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.7ms | ActiveRecord: 1.8ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.5ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 29], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 21], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 22], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 22], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 22]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] SQL (1.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 18], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 21]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 21], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 21]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 17], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 30], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 23], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 24], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 30]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 24], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 24]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 20], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 30]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 24], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 24]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 20], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 30]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 23], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 23]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 19], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.3ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 31], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 25], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 26], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 31]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 26], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 26]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 22], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["payment_id", 12], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 23], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (7.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 24], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 25], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]]  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.5ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 27]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 27 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 27], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 28]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 28 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 28], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT COUNT(*) FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT COUNT(*) FROM "adherent_query_members" ^ : SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 29]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 29 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 29], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 29 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 29], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 29], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 30]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 30 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 30], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 30 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 30], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 30], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.7ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 31]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 31 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 31], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 31 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 31], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 31], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 32]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 32 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 32], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 32 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 32], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 32], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.6ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 33]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 33 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 33], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 33 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 33], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] SQL (1.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 33], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 33], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 33]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 34], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["payment_id", 13], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 33], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 33]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 34], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["payment_id", 14], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 35], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["payment_id", 14], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 33], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 33]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 35], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["payment_id", 15], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.6ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 34]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 34 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 34], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 34 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 34], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 34], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 34], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 34]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 36], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["payment_id", 16], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 34], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 34]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 36], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["payment_id", 17], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 37], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["payment_id", 17], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.6ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 35]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 35 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 35], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 35 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 35], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 35], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 35], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 35]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 38], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["payment_id", 18], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 35], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 35]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 38]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 38], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 39]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 39], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:12 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 09 May 2015 11:16:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 36]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 36 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 36], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 36 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 36], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 36], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 36], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 36]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 36]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 40]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 40], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["payment_id", 20], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["member_id", 37], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["zip", 59000]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 37]]  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 11]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 37]] SQL (0.3ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 37]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 32], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/38/coord/new Completed 302 Found in 16ms (ActiveRecord: 3.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.4ms | ActiveRecord: 1.5ms)  (3.0ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 34], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/39/coord/new Completed 302 Found in 13ms (ActiveRecord: 4.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 35], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/40/coord/new Completed 302 Found in 11ms (ActiveRecord: 3.5ms)  (0.3ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.4ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"41"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 3.6ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"42"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 42 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 42 [["name", "Dalton"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/42 Completed 302 Found in 11ms (ActiveRecord: 3.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"43"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/43 Completed 302 Found in 6ms (ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"44"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/44 Completed 302 Found in 7ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.4ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.8ms | ActiveRecord: 2.0ms)  (1.1ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x4adf79c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 7ms (ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x4a39342 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 47; Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 47;  Sent data Mon association-09-mai-2015-Membres.csv (8.9ms) Completed 200 OK in 18ms (Views: 8.8ms | ActiveRecord: 4.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as XLS Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 49; Adherent::QueryMember Load (1.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 49;  Sent data Mon association-09-mai-2015-Membres.csv (0.4ms) Completed 200 OK in 33ms (Views: 0.3ms | ActiveRecord: 3.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.7ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 50; Completed 200 OK in 11ms (Views: 2.7ms | ActiveRecord: 3.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.5ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 51], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 51], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 51], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 51], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 51], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:16:13 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 51; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 20.6ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 52], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 52], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 52], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 52], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 52], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:16:13 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 52; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 14.6ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 53], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 53], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 53], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 53], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 53], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2015-05-09 13:16:13 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (15.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 20.0ms | ActiveRecord: 0.6ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2015-05-09 13:16:13 +0200 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 53], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/60/coord/new Completed 302 Found in 8ms (ActiveRecord: 2.5ms) Started GET "/adherent/members/60/coord/new" for 127.0.0.1 at 2015-05-09 13:16:13 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"60"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "60"]] Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 60]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (19.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 32ms (Views: 25.1ms | ActiveRecord: 2.2ms)  (1.3ms) SELECT COUNT(*) FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 54], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 54], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 54], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 54], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 54], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:16:13 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.5ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 54;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 17.5ms | ActiveRecord: 2.3ms) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/61/payments" for 127.0.0.1 at 2015-05-09 13:16:13 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"61"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "61"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 61]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 9ms (Views: 4.0ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 55], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 55], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 55], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 55], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 55], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:16:13 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 55;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 18.9ms | ActiveRecord: 1.7ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/66/adhesions" for 127.0.0.1 at 2015-05-09 13:16:13 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"66"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "66"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 66]] Redirected to http://www.example.com/adherent/members/66/adhesions/new Completed 302 Found in 7ms (ActiveRecord: 1.4ms) Started GET "/adherent/members/66/adhesions/new" for 127.0.0.1 at 2015-05-09 13:16:13 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"66"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "66"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 66]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 66]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 16.8ms | ActiveRecord: 2.5ms)  (0.6ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 56], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 56], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 56], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 56], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 56], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:16:13 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 56;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 14.8ms | ActiveRecord: 2.2ms) Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/71/edit" for 127.0.0.1 at 2015-05-09 13:16:13 +0200 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"71"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (11.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 14.5ms | ActiveRecord: 1.0ms)  (0.7ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:13 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 57], ["updated_at", Sat, 09 May 2015 11:16:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 57], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 57], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 57], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 57], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:16:14 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 57; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 19.8ms | ActiveRecord: 1.9ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 76]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 76]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 76], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/76/adhesions" for 127.0.0.1 at 2015-05-09 13:16:14 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"76"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "76"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 76]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 76]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 42]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 42]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.4ms | ActiveRecord: 2.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 58], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 58], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 58], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 58], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 58], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:16:14 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 58; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 15.9ms | ActiveRecord: 1.8ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["member_id", 81], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 81]] Started GET "/adherent/members/81/coord" for 127.0.0.1 at 2015-05-09 13:16:14 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"81"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "81"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 81]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 11ms (Views: 6.7ms | ActiveRecord: 1.3ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 59], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 59], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 59], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 59], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 59) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 59) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 59], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:16:14 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 59; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.9ms | ActiveRecord: 1.9ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2015-05-09 13:16:14 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (10.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 12.9ms | ActiveRecord: 0.6ms)  (0.7ms) ROLLBACK  (0.6ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 60], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 60], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 60], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 60], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 60) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 60) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 60], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:16:14 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 60;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 15.6ms | ActiveRecord: 2.0ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/91/coord" for 127.0.0.1 at 2015-05-09 13:16:14 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"91"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "91"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 91]] Redirected to http://www.example.com/adherent/members/91/coord/new Completed 302 Found in 7ms (ActiveRecord: 1.7ms) Started GET "/adherent/members/91/coord/new" for 127.0.0.1 at 2015-05-09 13:16:14 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"91"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "91"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 91]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (24.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 27.4ms | ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.9ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 61], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 96], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 96]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 96]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 96], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 96]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 61]]  (0.4ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 62], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 97], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 97]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 97]]  (0.4ms) SAVEPOINT active_record_1 SQL (2.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 97], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 97]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 62]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 97], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 97]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 45], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["payment_id", 21], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 46], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["payment_id", 21], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 21]]  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 63], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (2.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 98], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 98]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 98]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 98], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 98]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 63]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 98], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 98]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 47]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 47], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["payment_id", 22], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 64], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 99], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 99]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 99]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 99], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 99]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 64]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 65], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 100], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 100]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 100]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 100], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 100]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 65]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 100], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 100]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 51]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 51], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["payment_id", 23], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 52]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 52], ["amount", #], ["created_at", Sat, 09 May 2015 11:16:14 UTC +00:00], ["payment_id", 23], ["updated_at", Sat, 09 May 2015 11:16:14 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.6ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (6.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 101]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 101 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 101], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT COUNT(*) FROM "adherent_query_members" ^ : SELECT COUNT(*) FROM "adherent_query_members" SQL (0.6ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 102]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 102 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 102], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.7ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 103]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 103 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 103], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 103 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 103], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]] SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 103], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 104]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 104 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 104], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 104 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 104], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 104], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 104], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]] Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 104]] Adherent::Adhesion Load (3.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 104]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["payment_id", 24], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 104], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 104]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 104]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["payment_id", 25], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 56]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 56], ["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["payment_id", 25], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 104], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 104]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 104]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 56]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 56], ["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["payment_id", 26], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 105]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 105 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 105], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 105 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 105], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 105], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 105], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 105]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 105]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 57]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 57], ["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["payment_id", 27], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 106]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 106 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 106], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 106 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 106], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 106], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 106], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 106]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 106]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 59], ["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["payment_id", 28], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 106], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 106]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 106]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 59], ["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["payment_id", 29], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 60], ["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["payment_id", 29], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.6ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 107]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 107 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 107], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 107 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 107], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 107], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 107], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 107]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 107]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 61]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 61], ["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["payment_id", 30], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 107], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 107]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 107]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 61]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 61], ["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["payment_id", 31], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 62], ["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["payment_id", 31], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 108]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 108 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 108], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 108 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 108], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 108], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.7ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 109]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 109 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 109], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 109 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 109], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]] SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 109], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.6ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 110]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 110 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:30:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 110], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:30:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 110 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:59 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 110], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:30:59 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:30:59 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 110], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:30:59 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.6ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (1.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (4.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 66], ["updated_at", Sat, 09 May 2015 11:33:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 66], ["updated_at", Sat, 09 May 2015 11:33:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 66], ["updated_at", Sat, 09 May 2015 11:33:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 111]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 111]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:32 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 111], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/111/payments/new" for 127.0.0.1 at 2015-05-09 13:33:32 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"111"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "111"]] Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 66]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 111]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 69]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (41.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (49.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (29.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.9ms) Completed 200 OK in 134ms (Views: 95.5ms | ActiveRecord: 9.8ms) Started POST "/adherent/members/111/payments" for 127.0.0.1 at 2015-05-09 13:33:32 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"111"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "111"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 111]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 66]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:33:32 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 111], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:32 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 111]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 69]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 69], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:32 UTC +00:00], ["payment_id", 32], ["updated_at", Sat, 09 May 2015 11:33:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/111/payments Completed 302 Found in 34ms (ActiveRecord: 6.7ms) Started GET "/adherent/members/111/payments" for 127.0.0.1 at 2015-05-09 13:33:32 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"111"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "111"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 111]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 69]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 111]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 32]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 111]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (18.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (30.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 37ms (Views: 28.4ms | ActiveRecord: 6.1ms)  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 111]]  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:32 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 67], ["updated_at", Sat, 09 May 2015 11:33:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 67], ["updated_at", Sat, 09 May 2015 11:33:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:32 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 67], ["updated_at", Sat, 09 May 2015 11:33:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 114]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 114]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:32 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 114], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:32 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/114/payments/new" for 127.0.0.1 at 2015-05-09 13:33:32 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"114"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 67]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 114]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 70]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.9ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/114/payments" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"114"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 114]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 67]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 114], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 114]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 70]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 70], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["payment_id", 33], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/114/payments Completed 302 Found in 32ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/114/payments" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"114"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "114"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 114]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 70]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 114]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 33]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 114]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 12.5ms | ActiveRecord: 4.9ms) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 114]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 70]]  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 68], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 68], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 68], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 117]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 117]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 117], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/117/payments/new" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"117"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 68]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 117]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (13.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.5ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/117/payments" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"117"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 68]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 117], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 117]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 71]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 71], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["payment_id", 34], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/117/payments Completed 302 Found in 23ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/117/payments" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"117"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "117"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 117]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 71]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.3ms | ActiveRecord: 4.4ms) Adherent::Payment Load (1.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 117]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 118]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 118]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 118], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 119]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 119]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 119], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/34/reglements/new" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"34"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "34"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 117]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 34]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 118]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 72]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 119]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 73]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (21.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (26.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40ms (Views: 26.4ms | ActiveRecord: 6.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 69], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 69], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 69], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 120]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 120]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 120], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/120/payments/new" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"120"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 69]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 120]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 74]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.9ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/120/payments" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"120"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 69]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 120], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 120]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 74]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 74], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["payment_id", 35], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/120/payments Completed 302 Found in 18ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/120/payments" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"120"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "120"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 120]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 74]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (17.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 17.0ms | ActiveRecord: 4.9ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 120]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 121]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 121]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 121], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 122]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 122]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 122], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/35/reglements/new" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"35"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "35"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 35]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 122]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 76]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 121]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 75]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (19.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (22.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 22.7ms | ActiveRecord: 6.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 70], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 70], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 70], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 123]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 123]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 123], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/123/payments/new" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"123"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 70]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 123]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 77]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (13.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 15.5ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/123/payments" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"123"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 70]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 123], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 123]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 77]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 77], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["payment_id", 36], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/123/payments Completed 302 Found in 19ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/123/payments" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"123"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "123"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 123]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Adhesion Load (1.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 77]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (20.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 18.3ms | ActiveRecord: 5.7ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 123]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 124]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 124]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 124], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 125]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 125]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 125], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/36/reglements/new" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"36"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 123]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 125]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 79]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 124]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 78]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (19.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (22.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 22.2ms | ActiveRecord: 5.5ms) Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 123]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 123]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 36]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 71], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 71], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 71) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 71) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 71], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 126]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 126]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 126], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/126/payments/new" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"126"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "126"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 71]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 126]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 80]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (12.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 15.5ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/126/payments" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"126"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "126"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 71]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 126], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 126]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 80]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 80], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["payment_id", 37], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/126/payments Completed 302 Found in 18ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/126/payments" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"126"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "126"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 126]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 80]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 18.5ms | ActiveRecord: 4.4ms) Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 126]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 127]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 127]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 127], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 128]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 128]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 128], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/37/reglements/new" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"37"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "37"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 126]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 37]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 128]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 82]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 127]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 81]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (19.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 18.7ms | ActiveRecord: 5.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 72) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 72) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 72], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 72) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 72) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 72], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 72) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 72) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 72], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 129]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 129]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 129], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/129/payments/new" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"129"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "129"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 72]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 129]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 83]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.4ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/129/payments" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"129"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "129"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 72]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 129], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 129]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 83]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 83], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["payment_id", 38], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/129/payments Completed 302 Found in 18ms (ActiveRecord: 5.2ms) Started GET "/adherent/members/129/payments" for 127.0.0.1 at 2015-05-09 13:33:33 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"129"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "129"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 129]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 83]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (17.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (20.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 19.2ms | ActiveRecord: 4.2ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 129]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 130]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 130]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 130], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 131]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 131]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:33 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 131], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/38/reglements/new" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"38"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 84]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 131]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 85]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (16.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.4ms | ActiveRecord: 5.0ms) Started POST "/adherent/payments/38/reglements" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"84"}, "commit"=>"Enregistrer", "payment_id"=>"38"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "84"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 84]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 84], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["payment_id", 38], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Redirected to http://www.example.com/adherent/members/129/payments Completed 302 Found in 15ms (ActiveRecord: 4.6ms) Started GET "/adherent/members/129/payments" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"129"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "129"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 129]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 83]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 84]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]]  (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 38]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.8ms | ActiveRecord: 4.5ms) Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 83]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 73) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 73) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 73], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 73) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 73) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 73], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 73) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 73) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 73], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 132]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 132]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 132], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/132/payments/new" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"132"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 73]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 132]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 86]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (12.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.7ms | ActiveRecord: 2.2ms) Started POST "/adherent/members/132/payments" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"132"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 73]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 132], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 132]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 86]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 86], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["payment_id", 39], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/132/payments Completed 302 Found in 19ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/132/payments" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"132"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 132]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 86]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.4ms | ActiveRecord: 4.1ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 132]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 133]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 133]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 133], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 134]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 134]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 134], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/39/reglements/new" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"39"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "39"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 87]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 134]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 88]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (17.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (22.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 21.7ms | ActiveRecord: 5.5ms) Started POST "/adherent/payments/39/reglements" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"87"}, "commit"=>"Enregistrer", "payment_id"=>"39"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "39"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "87"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 87]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 87], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["payment_id", 39], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Redirected to http://www.example.com/adherent/members/132/payments Completed 302 Found in 18ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/132/payments" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"132"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "132"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 132]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 86]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 87]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 39]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (20.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (23.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 20.8ms | ActiveRecord: 5.6ms) Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 87]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (2.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 74) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 74) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 74], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 74) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 74) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 74], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 74) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 74) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 74], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 135]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 135]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 135], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/135/payments/new" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"135"} Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "135"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 74]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 135]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 89]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (10.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 11.8ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/135/payments" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"135"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "135"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 135]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 74]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 135], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 135]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 89]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 89], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["payment_id", 40], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/135/payments Completed 302 Found in 19ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/135/payments" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"135"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "135"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 135]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 89]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 135]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 135]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.4ms | ActiveRecord: 4.0ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 135]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 136]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 136]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 136], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 137]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 137]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 137], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/40/reglements/new" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"40"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "40"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 135]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 136]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 90]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 137]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 91]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (18.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 17.9ms | ActiveRecord: 6.3ms) Started POST "/adherent/payments/40/reglements" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"90"}, "commit"=>"Enregistrer", "payment_id"=>"40"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "40"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "90"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 90]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 90], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["payment_id", 40], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 135]] Redirected to http://www.example.com/adherent/members/135/payments Completed 302 Found in 14ms (ActiveRecord: 4.2ms) Started GET "/adherent/members/135/payments" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"135"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "135"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 135]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 89]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 135]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 90]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 136]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 40]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 135]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.4ms | ActiveRecord: 5.6ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 136]]  (1.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 90]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 75) LIMIT 1  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 75) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 75], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 75) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 75) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 75], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 75) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 75) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 75], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 138]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 138]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 138], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/138/payments/new" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"138"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "138"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 75]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 138]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 92]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 14.3ms | ActiveRecord: 3.6ms) Started POST "/adherent/members/138/payments" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"138"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "138"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 75]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 138], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 138]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 92]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 92], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["payment_id", 41], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/138/payments Completed 302 Found in 18ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/138/payments" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"138"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "138"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 138]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 92]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (17.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.7ms | ActiveRecord: 4.6ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 138]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 139]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 139]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 139], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 140]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 140]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 140], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/41/reglements/new" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"41"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 140]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 94]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 139]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 93]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (17.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.2ms | ActiveRecord: 5.3ms) Started POST "/adherent/payments/41/reglements" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"93"}, "commit"=>"Enregistrer", "payment_id"=>"41"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "93"]] Adherent::Reglement Load (1.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 93]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 93], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["payment_id", 41], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Redirected to http://www.example.com/adherent/members/138/payments Completed 302 Found in 12ms (ActiveRecord: 4.8ms) Started GET "/adherent/members/138/payments" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"138"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "138"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 138]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 92]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 93]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 139]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 41]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 138]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.3ms | ActiveRecord: 5.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 76) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 76) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 76], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 76) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 76) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 76], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 76) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 76) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 76], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 141]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 141]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 141], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/141/payments/new" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"141"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "141"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 76]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 141]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 95]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 13.6ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/141/payments" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"141"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "141"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 76]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 141], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 141]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 95]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 95], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["payment_id", 42], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/141/payments Completed 302 Found in 17ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/141/payments" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"141"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "141"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 141]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 95]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (18.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (21.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 20.4ms | ActiveRecord: 4.0ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 141]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 142]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 142]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 142], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 143]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 143]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 143], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/42/reglements/new" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"42"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "42"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 143]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 97]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 96]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (15.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (18.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 17.2ms | ActiveRecord: 5.9ms) Started POST "/adherent/payments/42/reglements" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"96"}, "commit"=>"Enregistrer", "payment_id"=>"42"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "42"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "96"]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 96]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 96], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["payment_id", 42], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Redirected to http://www.example.com/adherent/members/141/payments Completed 302 Found in 11ms (ActiveRecord: 3.8ms) Started GET "/adherent/members/141/payments" for 127.0.0.1 at 2015-05-09 13:33:34 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"141"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "141"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 141]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 95]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 96]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (17.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (19.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 17.7ms | ActiveRecord: 5.5ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 77) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 77) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 77], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 77) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 77) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:34 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 77], ["updated_at", Sat, 09 May 2015 11:33:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 77) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 77) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 77], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 144]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 144]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 144], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/144/payments/new" for 127.0.0.1 at 2015-05-09 13:33:35 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"144"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "144"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 77]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 144]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 98]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (12.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 27ms (Views: 14.6ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/144/payments" for 127.0.0.1 at 2015-05-09 13:33:35 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"144"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "144"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 144]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 77]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 144], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 144]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 98]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 98], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["payment_id", 43], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/144/payments Completed 302 Found in 17ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/144/payments" for 127.0.0.1 at 2015-05-09 13:33:35 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"144"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "144"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 144]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 98]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 144]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 43]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 144]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 16.2ms | ActiveRecord: 4.2ms)  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 144]]  (0.7ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 78) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 78) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 78], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 78) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 78) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 78], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 78) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 78) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 78], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 147]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 147]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 147], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 147]] Started GET "/adherent/members/147/payments/new" for 127.0.0.1 at 2015-05-09 13:33:35 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"147"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "147"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 78]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 147]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 99]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (11.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.4ms | ActiveRecord: 2.6ms) Started POST "/adherent/members/147/payments" for 127.0.0.1 at 2015-05-09 13:33:35 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"147"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "147"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 147]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 78]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 147], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 147]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 99]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 99], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["payment_id", 44], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/147/payments Completed 302 Found in 19ms (ActiveRecord: 5.0ms) Started GET "/adherent/members/147/payments" for 127.0.0.1 at 2015-05-09 13:33:35 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"147"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "147"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 147]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 99]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 147]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 44]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 147]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.6ms | ActiveRecord: 4.0ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 147]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 79) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 79) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 79], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 79) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 79) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 79], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 79) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 79) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 79], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 150]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 150]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 150], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/150/payments/new" for 127.0.0.1 at 2015-05-09 13:33:35 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"150"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "150"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 79]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 150]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 100]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (16.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (17.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 19.5ms | ActiveRecord: 2.0ms) Started POST "/adherent/members/150/payments" for 127.0.0.1 at 2015-05-09 13:33:35 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"150"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "150"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 150]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 79]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 150], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 150]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 100]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 100], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["payment_id", 45], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/150/payments Completed 302 Found in 17ms (ActiveRecord: 4.7ms) Started GET "/adherent/members/150/payments" for 127.0.0.1 at 2015-05-09 13:33:35 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"150"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "150"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 150]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 100]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 150]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 45]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 150]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (13.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.7ms | ActiveRecord: 3.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (1.1ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.9ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 80) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 80) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 80], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 80) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 80) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 80], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 80) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 80) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 80], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (3.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 153]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 153]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 153], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/153/payments/new" for 127.0.0.1 at 2015-05-09 13:33:35 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"153"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "153"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 80]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 153]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 101]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (16.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 18.4ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/153/payments" for 127.0.0.1 at 2015-05-09 13:33:35 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"153"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "153"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 153]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 80]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 153], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 153]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 101]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 101], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["payment_id", 46], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/153/payments Completed 302 Found in 23ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/153/payments" for 127.0.0.1 at 2015-05-09 13:33:35 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"153"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "153"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 153]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 101]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 153]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 46]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 153]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (17.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 16.0ms | ActiveRecord: 4.2ms)  (0.7ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 153]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 81) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 81], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 81) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 81], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 81) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 81], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 156]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 156]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 156], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/156/payments/new" for 127.0.0.1 at 2015-05-09 13:33:35 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"156"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "156"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 81]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 156]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 102]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (10.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 12.9ms | ActiveRecord: 3.2ms) Started POST "/adherent/members/156/payments" for 127.0.0.1 at 2015-05-09 13:33:35 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"156"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "156"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 156]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 81]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 156], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 156]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 102]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 102], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["payment_id", 47], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/156/payments Completed 302 Found in 19ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/156/payments" for 127.0.0.1 at 2015-05-09 13:33:35 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"156"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "156"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 156]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 102]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 156]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 156]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.8ms | ActiveRecord: 4.2ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 156]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 47]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 82) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 82) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 82], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 82) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 82) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 82], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 159], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 160], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 160]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 82]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 160], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 160]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 104]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 104], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["payment_id", 48], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 160]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 82]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 160], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 160]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 104]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 104], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["payment_id", 49], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 82]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 159], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 159]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 103]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 103], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["payment_id", 50], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.5ms) DELETE FROM "adherent_members"  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 83) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 83) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 83], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 83) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 83) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 83], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 161], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 162], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 162]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 83]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 162], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 162]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 106]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 106], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["payment_id", 51], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 84) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 84) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 84], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 84) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 84) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 84], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 163], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 164], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 164]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 84]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 164], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 164]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 108]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 108], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["payment_id", 52], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 163]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 84]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 163], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 163]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 107]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 107], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["payment_id", 53], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.7ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 109]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 109], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 110]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 110], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 110]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 111]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 111], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 111]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 111]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 85) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 85) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 85], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/165/adhesions/new" for 127.0.0.1 at 2015-05-09 13:33:35 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"165"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "165"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 165]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 165]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 16.6ms | ActiveRecord: 1.8ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 86) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 86) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:35 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 86], ["updated_at", Sat, 09 May 2015 11:33:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/166/adhesions/new" for 127.0.0.1 at 2015-05-09 13:33:35 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"166"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "166"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 166]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 166]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (8.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 10.6ms | ActiveRecord: 1.6ms)  (0.9ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 166]] Started POST "/adherent/members/166/adhesions" for 127.0.0.1 at 2015-05-09 13:33:36 +0200 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"166"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "166"]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 166], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/166/adhesions Completed 302 Found in 8ms (ActiveRecord: 2.2ms) Started GET "/adherent/members/166/adhesions" for 127.0.0.1 at 2015-05-09 13:33:36 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"166"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "166"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 166]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 166]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 112]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 112]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.4ms | ActiveRecord: 3.0ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 166]] SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 87) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 87], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 167], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/167/adhesions" for 127.0.0.1 at 2015-05-09 13:33:36 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"167"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "167"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 167]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 167]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 113]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 113]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (6.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 7.3ms | ActiveRecord: 2.5ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 88], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 168], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/168/adhesions" for 127.0.0.1 at 2015-05-09 13:33:36 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"168"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "168"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 168]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 168]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 114]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 114]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (6.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 13ms (Views: 7.9ms | ActiveRecord: 2.3ms) Started GET "/adherent/members/168/adhesions/114/edit" for 127.0.0.1 at 2015-05-09 13:33:36 +0200 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"168", "id"=>"114"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "168"]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 168], ["id", "114"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (7.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/edit.html.erb within layouts/adherent/application (9.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 12.0ms | ActiveRecord: 2.0ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 89) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 89) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 89], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 169], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/169/adhesions" for 127.0.0.1 at 2015-05-09 13:33:36 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"169"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "169"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 169]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 169]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 115]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 115]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (6.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 7.6ms | ActiveRecord: 2.3ms) Started GET "/adherent/members/169/payments/new" for 127.0.0.1 at 2015-05-09 13:33:36 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"169"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "169"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 89]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 169]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 115]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (13.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.4ms | ActiveRecord: 2.6ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x6016fc0 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (0.5ms) Completed 200 OK in 9ms (Views: 2.0ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5ff44d4 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x5fcc696 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5fcc74a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (1.2ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["member_id", 170], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["zip", 59000]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 170]]  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 23]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 170]] SQL (0.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 170]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK SQL (0.9ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (100.2ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 93], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 93], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 93], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 93], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 93], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) BEGIN Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 171]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 93]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:36 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 171], ["mode", "Chèque"], ["updated_at", Sat, 09 May 2015 11:33:36 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 171]]  (1.2ms) COMMIT Started GET "/adherent/members/171/payments/54" for 127.0.0.1 at 2015-05-09 13:33:40 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"171", "id"=>"54"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "171"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 54 LIMIT 1 [["member_id", 171]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 171]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (13.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 66ms (Views: 37.7ms | ActiveRecord: 14.0ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-05-09 13:33:40 +0200 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-05-09 13:33:40 +0200 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-05-09 13:33:40 +0200 Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-05-09 13:33:40 +0200 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-05-09 13:33:40 +0200 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-05-09 13:33:40 +0200 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-05-09 13:33:40 +0200 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-05-09 13:33:40 +0200 Started DELETE "/adherent/members/171/payments/54" for 127.0.0.1 at 2015-05-09 13:33:42 +0200 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"171", "id"=>"54"} Organism Load (1.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (6.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "171"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 171], ["id", "54"]]  (0.3ms) BEGIN Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 54]] SQL (1.8ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 54]]  (54.1ms) COMMIT Redirected to http://127.0.0.1:56417/adherent/members/171/payments Completed 302 Found in 78ms (ActiveRecord: 65.6ms) Started GET "/adherent/members/171/payments" for 127.0.0.1 at 2015-05-09 13:33:42 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"171"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "171"]] Adherent::Payment Load (5.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 171]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 17.2ms | ActiveRecord: 13.6ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-05-09 13:33:42 +0200  (0.9ms) SELECT COUNT(*) FROM "adherent_payments"  (0.6ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (1.7ms) select table_name from information_schema.views where table_schema = 'adh_test'  (185.9ms) TRUNCATE TABLE "adherent_members", "adherent_adhesions", "adherent_coords", "adherent_reglements", "organisms", "adherent_payments" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (2.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:43 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:43 UTC +00:00]]  (111.8ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:43 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:43 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:43 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:43 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:43 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:33:43 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (3.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 49ms (Views: 26.9ms | ActiveRecord: 4.8ms) Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-05-09 13:33:44 +0200 Started GET "/assets/adherent/icones/csv.png" for 127.0.0.1 at 2015-05-09 13:33:44 +0200 Started GET "/assets/adherent/icones/xls.png" for 127.0.0.1 at 2015-05-09 13:33:44 +0200 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-05-09 13:33:44 +0200 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-05-09 13:33:44 +0200 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-05-09 13:33:44 +0200 Started GET "/assets/back_disabled.png" for 127.0.0.1 at 2015-05-09 13:33:44 +0200 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-05-09 13:33:44 +0200 Started GET "/assets/forward_disabled.png" for 127.0.0.1 at 2015-05-09 13:33:44 +0200 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2015-05-09 13:33:45 +0200 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (6.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (3.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (4.5ms) BEGIN Adherent::Coord Load (3.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (2.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] SQL (0.5ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (56.6ms) COMMIT Redirected to http://127.0.0.1:56417/adherent/members Completed 302 Found in 98ms (ActiveRecord: 81.8ms) Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:33:45 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (4.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 15.3ms | ActiveRecord: 11.0ms)  (1.5ms) SELECT COUNT(*) FROM "adherent_members"  (0.7ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (1.5ms) select table_name from information_schema.views where table_schema = 'adh_test'  (162.7ms) TRUNCATE TABLE "adherent_members", "adherent_adhesions", "adherent_coords", "organisms", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (0.6ms) ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:46 UTC +00:00]]  (126.7ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:46 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:46 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:46 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:46 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:46 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.4ms) BEGIN SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:46 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:46 UTC +00:00]]  (1.1ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-05-09 13:33:46 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (1.0ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.2ms | ActiveRecord: 4.4ms) Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2015-05-09 13:33:47 +0200 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (6.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (2.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN SQL (3.2ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (121.0ms) COMMIT Redirected to http://127.0.0.1:56417/adherent/members/1/adhesions Completed 302 Found in 149ms (ActiveRecord: 140.2ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-05-09 13:33:47 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (1.1ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:56417/adherent/members/1/adhesions/new Completed 302 Found in 8ms (ActiveRecord: 3.3ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2015-05-09 13:33:47 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 15.0ms | ActiveRecord: 2.7ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-05-09 13:33:48 +0200  (0.9ms) SELECT COUNT(*) FROM "adherent_adhesions"  (0.6ms) ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (182.0ms) TRUNCATE TABLE "adherent_members", "adherent_adhesions", "adherent_coords", "adherent_reglements", "organisms", "adherent_payments" RESTART IDENTITY CASCADE;  (0.5ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:33:49 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (3.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 26.6ms | ActiveRecord: 4.2ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 2], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 2], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 2], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 2], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:33:49 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 2; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 17.6ms | ActiveRecord: 2.4ms)  (0.8ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (1.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 3], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 3], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 3], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 3], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:33:49 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 3; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 14.7ms | ActiveRecord: 2.1ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2015-05-09 13:33:49 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (12.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 23ms (Views: 18.6ms | ActiveRecord: 0.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 4], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 4], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 4], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 4], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:33:49 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 4;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 15.7ms | ActiveRecord: 2.8ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/16/adhesions" for 127.0.0.1 at 2015-05-09 13:33:49 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"16"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Adhesion Exists (0.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 16]] Redirected to http://www.example.com/adherent/members/16/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.9ms) Started GET "/adherent/members/16/adhesions/new" for 127.0.0.1 at 2015-05-09 13:33:49 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"16"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 16]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 12.5ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 5], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 5], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 5], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 5], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 5], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:33:49 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 5;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 17.1ms | ActiveRecord: 1.9ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/21/edit" for 127.0.0.1 at 2015-05-09 13:33:49 +0200 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"21"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "21"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (13.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 19.6ms | ActiveRecord: 1.1ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 6], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 6], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 6], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 6], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 6], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:33:49 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 6; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 20.9ms | ActiveRecord: 1.9ms) Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 26]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 26]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 26], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/26/adhesions" for 127.0.0.1 at 2015-05-09 13:33:49 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"26"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 26]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 26]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 15ms (Views: 8.4ms | ActiveRecord: 2.6ms)  (0.3ms) ROLLBACK  (0.7ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 7], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 7], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 7], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 7], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 7], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:33:49 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 7; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 16.1ms | ActiveRecord: 1.9ms) Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/31/coord" for 127.0.0.1 at 2015-05-09 13:33:49 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"31"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]] Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 31]] Redirected to http://www.example.com/adherent/members/31/coord/new Completed 302 Found in 8ms (ActiveRecord: 3.5ms) Started GET "/adherent/members/31/coord/new" for 127.0.0.1 at 2015-05-09 13:33:49 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"31"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (23.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 29.0ms | ActiveRecord: 2.0ms)  (0.5ms) ROLLBACK  (0.8ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 8], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 8], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 8], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 8], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (1.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 8], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:33:49 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 8;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 18.7ms | ActiveRecord: 2.0ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/36/payments" for 127.0.0.1 at 2015-05-09 13:33:49 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"36"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "36"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 36]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.6ms) Completed 200 OK in 9ms (Views: 5.5ms | ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 9], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 9], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 9], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 9], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 9], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 13:33:49 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 9;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 16.0ms | ActiveRecord: 2.1ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["member_id", 41], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 41]] Started GET "/adherent/members/41/coord" for 127.0.0.1 at 2015-05-09 13:33:49 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"41"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "41"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 41]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 6.3ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 10], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 10], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 10], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 10], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 10], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2015-05-09 13:33:50 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (13.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 16.1ms | ActiveRecord: 0.6ms)  (1.1ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2015-05-09 13:33:50 +0200 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 10], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/51/coord/new Completed 302 Found in 10ms (ActiveRecord: 2.7ms) Started GET "/adherent/members/51/coord/new" for 127.0.0.1 at 2015-05-09 13:33:50 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"51"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "51"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 51]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 21.4ms | ActiveRecord: 1.5ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_members"  (0.8ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x63e870c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 3.0ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x63c692c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x639d310 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x639d310%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x63738d0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 3.0ms | ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6350baa @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x632822c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.4ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6303080 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6303080%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x62e227c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x62e227c%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 5ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62ba06a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.6ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x629ac6a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x627f87a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 52], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 52]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 52]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 52], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 52]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 52], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 52]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 2], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 3], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 53], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 53]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 53]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 53], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 53]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 23]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 54], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 54]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 54]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 54], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 54]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 24]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 55], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 55]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 55]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 55], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 55]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 25]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 55], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 55]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 8], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["payment_id", 2], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 9], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["payment_id", 2], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 56], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 56]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 56]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 56], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 56]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 26]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 56], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 56]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 10], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["payment_id", 3], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5f3deb4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 7ms (ActiveRecord: 2.3ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5f2095e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 4ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.6ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"57"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.6ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"58"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/58 Completed 302 Found in 6ms (ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"59"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/59 Completed 302 Found in 5ms (ActiveRecord: 1.4ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"60"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 60 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 60 [["name", "Dalton"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/60 Completed 302 Found in 14ms (ActiveRecord: 4.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.8ms) ROLLBACK  (0.6ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 36; Adherent::QueryMember Load (0.9ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 36;  Sent data Mon association-09-mai-2015-Membres.csv (1.5ms) Completed 200 OK in 9ms (Views: 1.4ms | ActiveRecord: 3.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as XLS Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 37; Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 37;  Sent data Mon association-09-mai-2015-Membres.csv (0.4ms) Completed 200 OK in 14ms (Views: 0.1ms | ActiveRecord: 4.4ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.9ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 38; Completed 200 OK in 8ms (Views: 1.8ms | ActiveRecord: 3.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.4ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 40], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/61/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.6ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 41], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/62/coord/new Completed 302 Found in 13ms (ActiveRecord: 4.1ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 42) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 42], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/63/coord/new Completed 302 Found in 10ms (ActiveRecord: 3.3ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.7ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.3ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 46) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 46], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/64/coord/new" for 127.0.0.1 at 2015-05-09 13:33:50 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"64"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "64"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 64]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (30.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (3.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.3ms) Completed 200 OK in 53ms (Views: 45.7ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/64/coord" for 127.0.0.1 at 2015-05-09 13:33:50 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"64"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "64"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 64]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 64], ["office", ""], ["tel", ""], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/64/adhesions/new Completed 302 Found in 13ms (ActiveRecord: 3.7ms) Started GET "/adherent/members/64/adhesions/new" for 127.0.0.1 at 2015-05-09 13:33:50 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"64"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "64"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 64]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 64]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (13.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 20.6ms | ActiveRecord: 2.2ms) Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 64]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 47) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:50 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 47], ["updated_at", Sat, 09 May 2015 11:33:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/65/coord/new" for 127.0.0.1 at 2015-05-09 13:33:50 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"65"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "65"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 65]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (19.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 21.9ms | ActiveRecord: 1.7ms) Started POST "/adherent/members/65/coord" for 127.0.0.1 at 2015-05-09 13:33:51 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"65"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "65"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 65]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 65], ["office", ""], ["tel", ""], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["zip", ""]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/65/adhesions/new Completed 302 Found in 11ms (ActiveRecord: 3.0ms) Started GET "/adherent/members/65/adhesions/new" for 127.0.0.1 at 2015-05-09 13:33:51 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"65"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "65"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 65]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 65]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.3ms | ActiveRecord: 2.2ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 48) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 48], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/66/coord/new" for 127.0.0.1 at 2015-05-09 13:33:51 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"66"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "66"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 66]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (18.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 21.0ms | ActiveRecord: 1.3ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 49) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 49], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/67/coord/new" for 127.0.0.1 at 2015-05-09 13:33:51 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"67"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "67"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 67]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (17.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 20.8ms | ActiveRecord: 1.5ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/67/coord" for 127.0.0.1 at 2015-05-09 13:33:51 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"67"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "67"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 67]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 67], ["office", ""], ["tel", ""], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/67/adhesions/new Completed 302 Found in 11ms (ActiveRecord: 3.4ms) Started GET "/adherent/members/67/adhesions/new" for 127.0.0.1 at 2015-05-09 13:33:51 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"67"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "67"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 67]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 67]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.3ms | ActiveRecord: 2.2ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 50) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 50], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 68]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 68]]  (0.7ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 68], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/68/payments/new" for 127.0.0.1 at 2015-05-09 13:33:51 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"68"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 50]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 68]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (14.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 22.2ms | ActiveRecord: 2.5ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.7ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 51) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 51], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 69]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 69]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 69], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/69/payments/new" for 127.0.0.1 at 2015-05-09 13:33:51 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"69"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "69"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 51]] Adherent::Adhesion Load (2.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 69]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 15.5ms | ActiveRecord: 4.5ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 52) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 52], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 70]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 70]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 70], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 70]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 52]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 70], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 70]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/70/payments/4" for 127.0.0.1 at 2015-05-09 13:33:51 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"70", "id"=>"4"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 4 LIMIT 1 [["member_id", 70]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 70]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (6.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40ms (Views: 30.0ms | ActiveRecord: 3.6ms) SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 53) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 53], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 71]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 71]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 71], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 71]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 53]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 71], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 71]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/71/payments/5" for 127.0.0.1 at 2015-05-09 13:33:51 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"71", "id"=>"5"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "71"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 5 LIMIT 1 [["member_id", 71]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 71]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 16.1ms | ActiveRecord: 6.1ms) SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 54], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 72]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 72]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 72], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 72]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 54]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 72], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 72]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/72/payments/6" for 127.0.0.1 at 2015-05-09 13:33:51 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"72", "id"=>"6"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "72"]] Adherent::Payment Load (1.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 6 LIMIT 1 [["member_id", 72]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 72]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 17.7ms | ActiveRecord: 4.7ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 55) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 55], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 73]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 73]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 73], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/73/payments/new" for 127.0.0.1 at 2015-05-09 13:33:51 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"73"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "73"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 55]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 73]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (13.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 17.2ms | ActiveRecord: 2.3ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 56], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 74]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 74]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 74], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/74/payments/new" for 127.0.0.1 at 2015-05-09 13:33:51 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"74"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "74"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 56]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 74]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 20.2ms | ActiveRecord: 1.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 74]] Started POST "/adherent/members/74/payments" for 127.0.0.1 at 2015-05-09 13:33:51 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"74"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "74"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 74]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 56]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 74], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 74]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/74/payments Completed 302 Found in 19ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/74/payments" for 127.0.0.1 at 2015-05-09 13:33:51 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"74"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "74"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 74]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 74]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 19.6ms | ActiveRecord: 3.9ms)  (1.1ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 74]] SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 57) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 57], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 75]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 75]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 75], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 75]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 57]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 75], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 75]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/75/payments" for 127.0.0.1 at 2015-05-09 13:33:51 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"75"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "75"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 75]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 75]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.5ms | ActiveRecord: 5.8ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 58) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 58], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 76]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 76]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 76], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 76]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 58]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 76], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 76]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/76/payments" for 127.0.0.1 at 2015-05-09 13:33:51 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"76"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "76"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 76]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 76]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (8.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.3ms | ActiveRecord: 5.0ms) Started GET "/adherent/payments/9/reglements/new" for 127.0.0.1 at 2015-05-09 13:33:51 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"9"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 76]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (10.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 19.4ms | ActiveRecord: 4.4ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6458d68 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6422862 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.3ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"09/05/2016", "from_date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x63f7946 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"09/05/2016", "from_date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x63c1e0e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x63c1e0e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"09/05/2016", "from_date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x6394670 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6394670%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x636a00a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x633f53a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.8ms | ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x631ae2e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x631ae2e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x62f7b5e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:51 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x62f7b5e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 5ms (ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62d1b02 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.7ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.9ms | ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x62afe9e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.3ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6293096 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6293096%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 5ms (ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x627902e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 77]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 77 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 77], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT COUNT(*) FROM "adherent_query_members" ^ : SELECT COUNT(*) FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 78]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 78 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 78], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 79]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 79 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 79], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 79 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 79], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 79], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 80]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 80 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 80], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 80 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 80], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 80], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.9ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 81]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 81 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 81], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 81 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 81], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 81], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 81], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 81]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 81]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 25], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 81], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 81]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 81]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 25], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 26], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 81], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 81]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 81]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 26], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["payment_id", 12], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 82]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 82 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 82], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 82 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 82], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 82], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 82], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]] Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 82]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 82]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 27], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["payment_id", 13], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 82], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 82]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 82]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 27], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["payment_id", 14], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 28], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["payment_id", 14], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 83]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 83 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 83], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 83 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 83], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 83], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 83], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 83]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 83]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 29], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["payment_id", 15], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 84]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 84 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 84], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 84 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 84], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 84], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 84], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 84]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 84]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 31], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["payment_id", 16], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 84], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 84]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 84]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 31], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["payment_id", 17], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 32], ["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["payment_id", 17], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.6ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 85]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 85 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 85], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 85 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 85], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 85], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 86]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 86 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 86], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 86 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 86], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 86], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x52dd6c4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.7ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.1ms | ActiveRecord: 2.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5267942 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5267942%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 8ms (ActiveRecord: 1.7ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x51ebd2e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x51ebd2e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 5ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x519415a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x517bed4 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5135524 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.5ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x50d5dd6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x504d990 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.8ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.6ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 90]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 90]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 90], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 90]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 90]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 91]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 91]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 91], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 91]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 91]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 92]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 92]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 92], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 92]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 92]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 11:33:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 11:33:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 19ms (Views: 3.8ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (6.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 93]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 93 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 93], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 94]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 94 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 94], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT COUNT(*) FROM "adherent_query_members" ^ : SELECT COUNT(*) FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 95]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 95 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 95], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 95 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 95], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 95], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 96]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 96 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 96], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 96 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 96], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 96], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 97]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 97 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 97], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 97 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 97], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 97], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 98]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 98 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 98], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 98 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 98], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]] SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 98], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 98], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 98]] Adherent::Adhesion Load (2.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 98]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 46], ["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["payment_id", 18], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 98], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 98]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 98]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 46], ["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 47]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 47], ["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.6ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 99]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 99 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 99], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 99 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 99], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 99], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 99], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 99]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 99]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 48], ["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["payment_id", 20], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 99], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 99]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 99]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 48]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 48], ["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["payment_id", 21], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 49]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 49], ["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["payment_id", 21], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 100]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 100 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 100], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 100 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 100], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]] SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 100], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 100], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 100]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 100]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 50]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 50], ["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["payment_id", 22], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 101]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 101 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 101], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 101 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 101], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 101], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 101], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 101]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 101]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 52]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 52], ["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["payment_id", 23], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 101], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 101]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 101]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 52]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 52], ["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["payment_id", 24], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 53]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 53], ["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["payment_id", 24], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 101], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 101]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 101]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 53]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 53], ["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["payment_id", 25], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 102]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 102 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 102], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 102 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 102], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:35:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 102], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:35:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (6.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 103]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 103 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 103], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 104]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 104 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 104], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT COUNT(*) FROM "adherent_query_members" ^ : SELECT COUNT(*) FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 105]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 105 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 105], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 105 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 105], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 105], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 106]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 106 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 106], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 106 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 106], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 106], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 106], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 106]] Adherent::Adhesion Load (2.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 106]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 58]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 58], ["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["payment_id", 26], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 106], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 106]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 106]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 58]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 58], ["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["payment_id", 27], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 59], ["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["payment_id", 27], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.7ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 107]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 107 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 107], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 107 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 107], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 107], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 107], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 107]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 107]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 60], ["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["payment_id", 28], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 108]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 108 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 108], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 108 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 108], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 108], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 108], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 108]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 108]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 62], ["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["payment_id", 29], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 108], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 108]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 108]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 62]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 62], ["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["payment_id", 30], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 63]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 63], ["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["payment_id", 30], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 109]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 109 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 109], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 109 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 109], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 109], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 109], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 109]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 109]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 64]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 64], ["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["payment_id", 31], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 109], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 109]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 109]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 64]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 64], ["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["payment_id", 32], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 65], ["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["payment_id", 32], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 109], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 109]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 109]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 65]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 65], ["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["payment_id", 33], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 110]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 110 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 110], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 110 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 110], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 110], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 111]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 111 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 111], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 111 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 111], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 111], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 112]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 112 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 112], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 112 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 112], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:36:35 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 112], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:36:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 113]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 113 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 113], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 114]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 114 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 114], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT COUNT(*) FROM "adherent_query_members" ^ : SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 115]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 115 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 115], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 115 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 115], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 115], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 116]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 116 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 116], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 116 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 116], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 116], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 117]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 117 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 117], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 117 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 117], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 117], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 118]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 118 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 118], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 118 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 118], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 118], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 119]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 119 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 119], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 119 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 119], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 119], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:37:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 119], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]] Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 119]] Adherent::Adhesion Load (2.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 119]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 80]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 80], ["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["payment_id", 34], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 119], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 119]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 119]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 80]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 80], ["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["payment_id", 35], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 81]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 81], ["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["payment_id", 35], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 120]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 120 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 120], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 120 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 120], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 120], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 120], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 120]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 82]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 82], ["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["payment_id", 36], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 120], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 120]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 120]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 82]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 82], ["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["payment_id", 37], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 83]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 83], ["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["payment_id", 37], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 121]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 121 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 121], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 121 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 121], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 121], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 121], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 121]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 121]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 84]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 84], ["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["payment_id", 38], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 121], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 121]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 121]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 84]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 84], ["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["payment_id", 39], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 85]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 85], ["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["payment_id", 39], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 121], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 121]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 121]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 85]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 85], ["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["payment_id", 40], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 122]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 122 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 122], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 122 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 122], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 122], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 122], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 122]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 122]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 86]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 86], ["amount", #], ["created_at", Sat, 09 May 2015 11:37:06 UTC +00:00], ["payment_id", 41], ["updated_at", Sat, 09 May 2015 11:37:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.6ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 123]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 123]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 123], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 123]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 123]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 124]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 124]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 124], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 124]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 124]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 125]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 125]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 125], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 125]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 125]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.6ms) ROLLBACK  (0.2ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (2.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 80) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 80) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 80], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 129], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 129]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 129]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 129], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 129]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 80]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 81) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 81) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 81], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 130], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 130]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 130]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 130], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 130]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 81]]  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 82) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 82) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 82], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 131], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 131]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 131]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 131], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 131]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 82]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 131], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]] Adherent::Adhesion Load (2.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 131]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 95]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 95], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["payment_id", 42], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 96]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 96], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["payment_id", 42], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 42]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 83) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 83) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 83], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 132], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 132]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 132]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 132], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 132]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 83]] SQL (0.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 132], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 132]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 97]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 97], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["payment_id", 43], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 12:56:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 84) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 84) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 84], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 133], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 133]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 133]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 133], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 133]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 84]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 133], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 133]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 99]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 99], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 44], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 100]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 100], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 44], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["member_id", 134], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["zip", 59000]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 134]]  (0.7ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 45]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 134]] SQL (0.7ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 134]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 135]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 135 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 135], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 136]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 136 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 136], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT COUNT(*) FROM "adherent_query_members" ^ : SELECT COUNT(*) FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 137]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 137 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 137], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 137 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 137], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 137], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 138]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 138 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 138], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 138 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 138], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 138], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 139]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 139 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 139], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 139 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 139], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 139], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 140]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 140 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 140], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 140 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 140], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 140], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 141]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 141 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 141], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 141 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 141], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 141], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 141], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 141]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 109]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 109], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 45], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 141], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 141]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 109]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 109], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 46], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 110]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 110], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 46], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 141], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 141]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 141]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 110]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 110], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 47], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (2.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 142]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 142 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 142], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 142 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 142], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 142], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 142], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 142]]  (1.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 111]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 111], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 48], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 142], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 142]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 142]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 111]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 111], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 49], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 112]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 112], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 49], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 143]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 143 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 143], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 143 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 143], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 143], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 143], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 143]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 143]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 113]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 113], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 50], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 143], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 143]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 143]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 113]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 113], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 51], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 114]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 114], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 51], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 144]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 144 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 144], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 144 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 144], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 144], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 144], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 144]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 144]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 115]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 115], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 52], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.7ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 85) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 85) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 85], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 85) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 85) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 85], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 145], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 146], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 146]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 85]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 146], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 146]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 118]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 118], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 53], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 146]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 85]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 146], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 146]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 118]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 118], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 54], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 145]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 85]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 145], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 145]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 117]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 117], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 55], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 86) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 86) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 86], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 86) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 86) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 86], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 147], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 148], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 148]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 86]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 148], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 148]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 120]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 120], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 56], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 147]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 86]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 147], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 147]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 119]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 119], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 57], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 87) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 87], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 87) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 87) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 87], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 149], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 150], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 150]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 87]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 150], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 150]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 122]] SQL (2.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 122], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 58], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (1.1ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 123]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 123], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 124]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 124], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 124]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 124]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 125]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 125], ["amount", #], ["created_at", Sat, 09 May 2015 12:56:26 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 09 May 2015 12:56:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 125]]  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (2.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 151]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 151 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 151], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 152]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 152 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 152], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 153]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 153 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 153], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 153 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 153], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 153], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 154]]  (1.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 154 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 154], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 154 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 154], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 154], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 155]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 155 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 155], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 155 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 155], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 155], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 156]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 156 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 156], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 156 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 156], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 156], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 156], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 156]] Adherent::Adhesion Load (2.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 156]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 132]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 132], ["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["payment_id", 59], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 156], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 156]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 156]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 132]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 132], ["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["payment_id", 60], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 133]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 133], ["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["payment_id", 60], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 157]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 157 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 157], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 157 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 157], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 157], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 157], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 157]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 157]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 134]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 134], ["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["payment_id", 61], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 158]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 158 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 158], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 158 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 158], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 158], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 158], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 158]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 158]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 136]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 136], ["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["payment_id", 62], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 158], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 158]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 158]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 136]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 136], ["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["payment_id", 63], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 137]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 137], ["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["payment_id", 63], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 159]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 159 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 159], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 159 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 159], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 159], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 159], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 159]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 138]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 138], ["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["payment_id", 64], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 159], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 159]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 138]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 138], ["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["payment_id", 65], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 139]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 139], ["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["payment_id", 65], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 159], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 159]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 159]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 139]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 139], ["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["payment_id", 66], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 160]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 160 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 160], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 160 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 160], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:00:12 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 160], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.6ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 161]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 161 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 161], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 162]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 162 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 162], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 163]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 163 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 163], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 163 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 163], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 163], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 164]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 164 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 164], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 164 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 164], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 164], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 164], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]] Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 164]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 164]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 144]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 144], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["payment_id", 67], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 165]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 165 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 165], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 165 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 165], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 165], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 165], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 165]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 165]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 146]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 146], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["payment_id", 68], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 165], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 165]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 165]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 146]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 146], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["payment_id", 69], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 147]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 147], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["payment_id", 69], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.6ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 166]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 166 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 166], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 166 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 166], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 166], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (4.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 166], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 166]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 166]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 148]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 148], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["payment_id", 70], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 166], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 166]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 166]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 148]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 148], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["payment_id", 71], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 149]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 149], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["payment_id", 71], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 166], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 166]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 166]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 149]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 149], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["payment_id", 72], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 167]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 167 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 167], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 167 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 167], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 167], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 167], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 167]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 167]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 150]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 150], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["payment_id", 73], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 167], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 167]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 167]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 150]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 150], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["payment_id", 74], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 151]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 151], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["payment_id", 74], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 168]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 168 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 168], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 168 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 168], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 168], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.7ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.8ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 169]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 169 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 169], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 169 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 169], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]] SQL (1.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 169], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.6ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 170]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 170 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 170], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 170 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 170], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:08 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 170], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:01:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.9ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.6ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:43 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 171]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 171 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:43 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 171], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:43 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 172]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 172 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:43 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 172], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:43 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:43 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 173]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 173 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:43 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 173], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:43 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 173 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:43 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 173], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:01:43 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:43 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 173], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:01:43 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:43 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 174]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 174 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:43 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 174], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 174 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:43 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 174], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:01:43 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:43 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 174], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:01:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.6ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 175]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 175 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 175], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 175 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 175], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]] SQL (3.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 175], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 175], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]] Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Adherent::Adhesion Load (2.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 175]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 162]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 162], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["payment_id", 75], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 175], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 175]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 162]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 162], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["payment_id", 76], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 163]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 163], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["payment_id", 76], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 175], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 175]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 175]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 163]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 163], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["payment_id", 77], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 176]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 176 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 176], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 176 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 176], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 176], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 176], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 176]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 176]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 164]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 164], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["payment_id", 78], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 177]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 177 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (3.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 177], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 177 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 177], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 177], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 177], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 177]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 177]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 166]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 166], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["payment_id", 79], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 177], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 177]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 177]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 166]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 166], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["payment_id", 80], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 167]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 167], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["payment_id", 80], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.3ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 178]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 178 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 178], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 178 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 178], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 178], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 178], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 178]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 168]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 168], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["payment_id", 81], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 178], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 178]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 178]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 168]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 168], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["payment_id", 82], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 169]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 169], ["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["payment_id", 82], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.4ms) SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_memb... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" ORDER BY "adherent_query_members"."id" ASC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_reglements" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 179]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 179 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 179], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (2.8ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 179 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 179], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 179], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.7ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 180]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 180 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 180], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 180 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 180], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:01:44 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 180], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:01:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (8.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 181]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 181 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 181], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.7ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (1.7ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 182]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 182 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 182], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 183]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 183 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 183], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 183 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 183], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 183], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 184]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 184 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 184], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 184 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 184], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]] SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 184], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.3ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 185]]  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 185 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 185], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 185 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 185], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 185], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.8ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.6ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 186]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 186 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 186], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 186 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 186], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]] SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 186], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 186], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]] Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 186]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 186]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 180]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 180], ["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["payment_id", 83], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 186], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 186]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 186]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 180]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 180], ["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["payment_id", 84], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 181]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 181], ["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["payment_id", 84], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 187]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 187 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 187], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 187 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 187], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 187], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 187], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 187]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 187]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 182]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 182], ["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["payment_id", 85], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.7ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 188]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 188 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 188], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 188 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 188], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 188], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 188], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 188]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 188]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 184]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 184], ["amount", #], ["created_at", Sat, 09 May 2015 13:08:57 UTC +00:00], ["payment_id", 86], ["updated_at", Sat, 09 May 2015 13:08:57 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:58 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 188], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:08:58 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 188]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 188]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 184]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 184], ["amount", #], ["created_at", Sat, 09 May 2015 13:08:58 UTC +00:00], ["payment_id", 87], ["updated_at", Sat, 09 May 2015 13:08:58 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 185]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 185], ["amount", #], ["created_at", Sat, 09 May 2015 13:08:58 UTC +00:00], ["payment_id", 87], ["updated_at", Sat, 09 May 2015 13:08:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:58 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 188], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:08:58 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 188]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 188]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 185]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 185], ["amount", #], ["created_at", Sat, 09 May 2015 13:08:58 UTC +00:00], ["payment_id", 88], ["updated_at", Sat, 09 May 2015 13:08:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:08:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:08:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 189]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 189 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:08:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 189], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:08:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 189 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:58 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 189], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:08:58 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:58 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 189], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:08:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:58 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 189], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:08:58 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 189]] Adherent::Adhesion Load (3.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 189]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 186]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 186], ["amount", #], ["created_at", Sat, 09 May 2015 13:08:58 UTC +00:00], ["payment_id", 89], ["updated_at", Sat, 09 May 2015 13:08:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:58 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 189], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:08:58 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 189]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 189]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 186]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 186], ["amount", #], ["created_at", Sat, 09 May 2015 13:08:58 UTC +00:00], ["payment_id", 90], ["updated_at", Sat, 09 May 2015 13:08:58 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 187]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 187], ["amount", #], ["created_at", Sat, 09 May 2015 13:08:58 UTC +00:00], ["payment_id", 90], ["updated_at", Sat, 09 May 2015 13:08:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:08:58 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:08:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 190]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 190 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:08:58 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 190], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:08:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 190 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:58 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 190], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:08:58 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:08:58 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 190], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:08:58 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.5ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.4ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:09:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:09:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 191]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 191 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:09:51 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 191], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:09:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.9ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:09:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:09:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 192]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 192 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:09:51 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 192], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:09:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:09:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:09:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 193]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 193 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:09:51 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 193], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:09:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 193 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:51 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 193], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:09:51 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:51 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 193], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:09:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 194]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 194 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 194], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 194 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 194], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 194], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 195]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 195 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 195], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 195 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 195], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 195], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (1.2ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 196]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 196 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 196], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 196 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 196], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 196], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 196], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 196]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 196]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 196]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 196], ["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["payment_id", 91], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 196], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 196]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 196]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 196]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 196], ["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["payment_id", 92], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 197]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 197], ["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["payment_id", 92], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 197]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 197 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 197], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 197 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 197], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 197], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 197], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 197]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 197]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 198]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 198], ["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["payment_id", 93], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 197], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 197]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 197]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 198]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 198], ["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["payment_id", 94], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (1.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 199]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 199], ["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["payment_id", 94], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 198]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 198 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 198], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 198 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 198], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 198], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 198], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]] Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 198]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 198]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 200]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 200], ["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["payment_id", 95], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.7ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 199]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 199 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 199], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 199 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 199], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 199], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 199], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 199]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 199]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 202]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 202], ["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["payment_id", 96], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 199], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 199]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 199]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 202]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 202], ["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["payment_id", 97], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 203]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 203], ["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["payment_id", 97], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 199], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 199]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 199]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 203]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 203], ["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["payment_id", 98], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 200]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 200 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 200], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 200 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 200], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:09:52 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 200], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:09:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.6ms) SELECT "adherent_query_members".* FROM "adherent_query_members" PG::UndefinedTable: ERREUR: la relation « adherent_query_members » n'existe pas LINE 1: SELECT "adherent_query_members".* FROM "adherent_query_membe... ^ : SELECT "adherent_query_members".* FROM "adherent_query_members" SQL (0.5ms) DELETE FROM "adherent_members" PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction : DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (2.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:11:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:11:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 201]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 201 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (3.3ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:11:41 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 201], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:11:41 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.5ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:11:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:11:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 202]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 202 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:11:41 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 202], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:11:41 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:11:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:11:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 203]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 203 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:11:41 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 203], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:11:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 203 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:41 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 203], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:11:41 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:41 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 203], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:11:41 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:11:41 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:11:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 204]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 204 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:11:41 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 204], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:11:41 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 204 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:41 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 204], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:11:41 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:41 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 204], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:11:41 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 204], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 204]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 204]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 208]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 208], ["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["payment_id", 99], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 204], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 204]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 204]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 208]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 208], ["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["payment_id", 100], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 209]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 209], ["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["payment_id", 100], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 204], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 204]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 204]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 209]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 209], ["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["payment_id", 101], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 205]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 205 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 205], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 205 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 205], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 205], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 205], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]] Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 205]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 205]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 210]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 210], ["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["payment_id", 102], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 205], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 205]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 205]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 210]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 210], ["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["payment_id", 103], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 211]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 211], ["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["payment_id", 103], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.7ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 206]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 206 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 206], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 206 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 206], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 206], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 206], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 206]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 206]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 212]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 212], ["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["payment_id", 104], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.7ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 207]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 207 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 207], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 207 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 207], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 207], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 207], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 207]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 207]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 214]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 214], ["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["payment_id", 105], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 207], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 207]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 207]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 214]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 214], ["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["payment_id", 106], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 215]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 215], ["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["payment_id", 106], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 208]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 208 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 208], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 208 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 208], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 208], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 209]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 209 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 209], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 209 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 209], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]] SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 209], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 210]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 210 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 210], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 210 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 210], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:11:42 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 210], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:11:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (7.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:12:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:12:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 211]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 211 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:12:08 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 211], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:12:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (89.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:12:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:12:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 212]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 212 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:12:08 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 212], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:12:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:12:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:12:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 213]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 213 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:12:08 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 213], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:12:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 213 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 213], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:12:08 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:08 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 213], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:12:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:12:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:12:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 214]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 214 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:12:08 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 214], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:12:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 214 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 214], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:12:08 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:08 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 214], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:12:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:08 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 214], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:12:08 UTC +00:00]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 214]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 214]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 224]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 224], ["amount", #], ["created_at", Sat, 09 May 2015 13:12:08 UTC +00:00], ["payment_id", 107], ["updated_at", Sat, 09 May 2015 13:12:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:12:08 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:12:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 215]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 215 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:12:08 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 215], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:12:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 215 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (85.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:08 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 215], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:12:08 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 215], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 215], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 215]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 215]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 226]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 226], ["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["payment_id", 108], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 215], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 215]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 215]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 226]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 226], ["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["payment_id", 109], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 227]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 227], ["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["payment_id", 109], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (1.2ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 216]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 216 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 216], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 216 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 216], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 216], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 216], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 216]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 216]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 228]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 228], ["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["payment_id", 110], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 216], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 216]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 216]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 228]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 228], ["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["payment_id", 111], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 229]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 229], ["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["payment_id", 111], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 216], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 216]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 216]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 229]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 229], ["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["payment_id", 112], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 217]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 217 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 217], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 217 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (49.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 217], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 217], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 217], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 217]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 217]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 230]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 230], ["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["payment_id", 113], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 217], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 217]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 217]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 230]] SQL (2.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 230], ["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["payment_id", 114], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 231]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 231], ["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["payment_id", 114], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 218]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 218 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 218], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 218 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 218], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 218], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (1.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 219]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 219 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 219], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 219 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 219], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]] SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 219], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 220]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 220 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 220], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 220 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 220], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:12:09 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 220], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:12:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 221]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 221 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 221], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 222]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 222 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 222], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 223]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 223 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 223], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 223 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 223], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 223], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 224]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 224 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 224], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 224 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 224], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 224], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 225]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 225 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 225], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 225 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 225], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 225], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 226]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 226 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 226], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 226 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 226], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 226], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 227]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 227 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 227], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 227 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 227], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 227], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 227], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 227]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 227]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 246]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 246], ["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["payment_id", 115], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 227], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 227]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 227]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 246]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 246], ["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["payment_id", 116], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 247]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 247], ["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["payment_id", 116], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 228]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 228 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 228], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 228 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 228], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 228], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 228], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]] Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 228]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 228]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 248]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 248], ["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["payment_id", 117], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 228], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 228]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 228]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 248]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 248], ["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["payment_id", 118], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 249]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 249], ["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["payment_id", 118], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 229]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 229 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 229], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 229 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 229], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 229], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 229], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 229]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 229]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 250]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 250], ["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["payment_id", 119], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.7ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.6ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 230]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (2.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 230 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 230], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 230 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 230], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 230], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 230], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 230]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 230]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 252]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 252], ["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["payment_id", 120], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 230], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 230]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 230]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 252]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 252], ["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["payment_id", 121], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 253]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 253], ["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["payment_id", 121], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 230], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 230]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 230]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 253]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 253], ["amount", #], ["created_at", Sat, 09 May 2015 13:13:49 UTC +00:00], ["payment_id", 122], ["updated_at", Sat, 09 May 2015 13:13:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (0.9ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.7ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 231]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 231 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 231], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 232]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 232 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 232], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 233]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 233 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 233], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 233 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 233], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 233], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 234]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 234 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 234], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 234 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 234], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 234], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 235]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 235 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 235], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 235 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 235], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]] SQL (0.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 235], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 236]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 236 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 236], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 236 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 236], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 236], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 237]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 237 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 237], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 237 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 237], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 237], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 237], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 237]] Adherent::Adhesion Load (1.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 237]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 262]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 262], ["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["payment_id", 123], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 237], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 237]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 237]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 262]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 262], ["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["payment_id", 124], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 263]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 263], ["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["payment_id", 124], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 238]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 238 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 238], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 238 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 238], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 238], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 238], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 238]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 238]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 264]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 264], ["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["payment_id", 125], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 238], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 238]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 238]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 264]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 264], ["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["payment_id", 126], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 265]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 265], ["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["payment_id", 126], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.7ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 239]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 239 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 239], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 239 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 239], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 239], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 239], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 239]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 239]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 266]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 266], ["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["payment_id", 127], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 240]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 240 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 240], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 240 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 240], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 240], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 240], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 240]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 240]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 268]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 268], ["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["payment_id", 128], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 240], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 240]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 240]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 268]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 268], ["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["payment_id", 129], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 269]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 269], ["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["payment_id", 129], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 240], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 240]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 240]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 269]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 269], ["amount", #], ["created_at", Sat, 09 May 2015 13:14:15 UTC +00:00], ["payment_id", 130], ["updated_at", Sat, 09 May 2015 13:14:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 241]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 241 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 241], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.9ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 242]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 242 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 242], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 243]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 243 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 243], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 243 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 243], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 243], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.7ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 244]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 244 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 244], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 244 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 244], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 244], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 245]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 245 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 245], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 245 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 245], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 245], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 246]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 246 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 246], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 246 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 246], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 246], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 247]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 247 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 247], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 247 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 247], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 247], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 247], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 247]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 247]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 278]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 278], ["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["payment_id", 131], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.7ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 248]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 248 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 248], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 248 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 248], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 248], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 248], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]] Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 248]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 248]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 280]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 280], ["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["payment_id", 132], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 248], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 248]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 248]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 280]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 280], ["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["payment_id", 133], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 281]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 281], ["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["payment_id", 133], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.7ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 249]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 249 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 249], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 249 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 249], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 249], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 249], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 249]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 249]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 282]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 282], ["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["payment_id", 134], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 249], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 249]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 249]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 282]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 282], ["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["payment_id", 135], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 283]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 283], ["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["payment_id", 135], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 250]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 250 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 250], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 250 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 250], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 250], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 250], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 250]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 250]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 284]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 284], ["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["payment_id", 136], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 250], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 250]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 250]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 284]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 284], ["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["payment_id", 137], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 285]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 285], ["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["payment_id", 137], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 250], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 250]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 250]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 285]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 285], ["amount", #], ["created_at", Sat, 09 May 2015 13:15:07 UTC +00:00], ["payment_id", 138], ["updated_at", Sat, 09 May 2015 13:15:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 251]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 251 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 251], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 252]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 252 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 252], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 253]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 253 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 253], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 253 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 253], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 253], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.8ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 254]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 254 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 254], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 254 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 254], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 254], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 255]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 255 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 255], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 255 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 255], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 255], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 256]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 256 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 256], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 256 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 256], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 256], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 257]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 257 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 257], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 257 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 257], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 257], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 257], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 257]] Adherent::Adhesion Load (2.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 257]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 294]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 294], ["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["payment_id", 139], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 257], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 257]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 257]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 294]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 294], ["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["payment_id", 140], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 295]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 295], ["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["payment_id", 140], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 258]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 258 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 258], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 258 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 258], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 258], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 258], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 258]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 258]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 296]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 296], ["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["payment_id", 141], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 258], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 258]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 258]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 296]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 296], ["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["payment_id", 142], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 297]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 297], ["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["payment_id", 142], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.7ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 259]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 259 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 259], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 259 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 259], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 259], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 259], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 259]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 259]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 298]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 298], ["amount", #], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["payment_id", 143], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 260]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 260 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:16:46 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 260], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:16:46 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 260 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:47 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 260], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:16:47 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:47 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 260], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:16:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:47 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 260], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:16:47 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 260]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 260]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 300]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 300], ["amount", #], ["created_at", Sat, 09 May 2015 13:16:47 UTC +00:00], ["payment_id", 144], ["updated_at", Sat, 09 May 2015 13:16:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:47 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 260], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:16:47 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 260]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 260]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 300]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 300], ["amount", #], ["created_at", Sat, 09 May 2015 13:16:47 UTC +00:00], ["payment_id", 145], ["updated_at", Sat, 09 May 2015 13:16:47 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 301]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 301], ["amount", #], ["created_at", Sat, 09 May 2015 13:16:47 UTC +00:00], ["payment_id", 145], ["updated_at", Sat, 09 May 2015 13:16:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:16:47 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 260], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:16:47 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 260]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 260]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 301]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 301], ["amount", #], ["created_at", Sat, 09 May 2015 13:16:47 UTC +00:00], ["payment_id", 146], ["updated_at", Sat, 09 May 2015 13:16:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (6.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 261]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 261 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 261], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.7ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 262]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 262 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 262], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 263]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 263 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 263], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 263 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 263], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 263], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 264]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 264 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 264], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 264 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 264], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 264], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 264], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]] Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 264]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 264]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 304]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 304], ["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["payment_id", 147], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 265]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 265 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 265], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 265 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 265], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 265], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 265], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 265]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 265]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 306]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 306], ["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["payment_id", 148], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 265], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 265]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 265]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 306]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 306], ["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["payment_id", 149], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 307]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 307], ["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["payment_id", 149], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 266]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 266 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 266], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 266 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 266], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 266], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 266], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 266]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 266]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 308]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 308], ["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["payment_id", 150], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 266], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 266]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 266]]  (1.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 308]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 308], ["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["payment_id", 151], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 309]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 309], ["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["payment_id", 151], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 266], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 266]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 266]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 309]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 309], ["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["payment_id", 152], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 267]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 267 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 267], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 267 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 267], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 267], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 267], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 267]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 267]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 310]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 310], ["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["payment_id", 153], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 267], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 267]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 267]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 310]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 310], ["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["payment_id", 154], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 311]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 311], ["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["payment_id", 154], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 268]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 268 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 268], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 268 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 268], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 268], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 269]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 269 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 269], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 269 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 269], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 269], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 270]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 270 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 270], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 270 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 270], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:17:28 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 270], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:17:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:18:06 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:18:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 271]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 271 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 271], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (3.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 272]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 272 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 272], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 273]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 273 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 273], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 273 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 273], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 273], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 274]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 274 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 274], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 274 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 274], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 274], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 275]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 275 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 275], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 275 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 275], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 275], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.7ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 276]]  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 276 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 276], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 276 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 276], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 276], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.7ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 277]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 277 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 277], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 277 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 277], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]] SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 277], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 277], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]] Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 277]] Adherent::Adhesion Load (2.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 277]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 326]] SQL (1.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 326], ["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["payment_id", 155], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 277], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 277]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 277]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 326]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 326], ["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["payment_id", 156], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 327]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 327], ["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["payment_id", 156], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.7ms) DELETE FROM "adherent_payments" SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 278]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 278 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 278], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 278 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 278], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]] SQL (2.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 278], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 278], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 278]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 278]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 328]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 328], ["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["payment_id", 157], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 279]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 279 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 279], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 279 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 279], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 279], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 279], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 279]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 279]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 330]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 330], ["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["payment_id", 158], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 279], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 279]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 279]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 330]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 330], ["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["payment_id", 159], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 331]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 331], ["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["payment_id", 159], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (5.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 280]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 280 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 280], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 280 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 280], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 280], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 280], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 280]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 280]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 332]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 332], ["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["payment_id", 160], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 280], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 280]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 280]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 332]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 332], ["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["payment_id", 161], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 333]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 333], ["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["payment_id", 161], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 280], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 280]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 280]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 333]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 333], ["amount", #], ["created_at", Sat, 09 May 2015 13:18:07 UTC +00:00], ["payment_id", 162], ["updated_at", Sat, 09 May 2015 13:18:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (8.4ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:12 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:12 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 281]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 281 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:12 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 281], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:12 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (3.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.7ms) DELETE FROM "adherent_members" SQL (0.6ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 282]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 282 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 282], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 283]]  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 283 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 283], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 283 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 283], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 283], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 284]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 284 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 284], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 284 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 284], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 284], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 SQL (0.9ms) DELETE FROM "adherent_members" SQL (0.6ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 285]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 285 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 285], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 285 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 285], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 285], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 286]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 286 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 286], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 286 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 286], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]] SQL (1.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 286], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 SQL (0.9ms) DELETE FROM "adherent_members" SQL (0.8ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (1.1ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 287]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 287 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 287], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 287 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 287], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]] SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 287], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 287], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]] Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 287]] Adherent::Adhesion Load (2.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 287]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 342]] SQL (1.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 342], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["payment_id", 163], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 287], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]] Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 287]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 287]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 342]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 342], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["payment_id", 164], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 343]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 343], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["payment_id", 164], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.9ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 288]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 288 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 288], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 288 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 288], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 288], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 288], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 288]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 288]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 344]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 344], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["payment_id", 165], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 288], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 288]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 288]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 344]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 344], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["payment_id", 166], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 345]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 345], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["payment_id", 166], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 288], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 288]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 288]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 345]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 345], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["payment_id", 167], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 289]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 289 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 289], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 289 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 289], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 289], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 289], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 289]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 289]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 346]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 346], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["payment_id", 168], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 289], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 289]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 289]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 346]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 346], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["payment_id", 169], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 347]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 347], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["payment_id", 169], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.3ms) DELETE FROM "adherent_reglements" SQL (0.3ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 290]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 290 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 290], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 290 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 290], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 290], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 290], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 290]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 290]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 348]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 348], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:13 UTC +00:00], ["payment_id", 170], ["updated_at", Sat, 09 May 2015 13:20:13 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.7ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.7ms) DELETE FROM "adherent_payments" SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (6.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 291]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 291 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 291], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_members" SQL (3.0ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 292]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 292 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 292], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 293]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 293 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 293], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 293 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 293], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 293], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 294]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 294 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 294], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 294 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 294], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 294], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 294], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]] Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 294]] Adherent::Adhesion Load (2.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 294]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 352]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 352], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["payment_id", 171], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 294], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 294]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 294]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 352]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 352], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["payment_id", 172], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 353]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 353], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["payment_id", 172], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 294], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 294]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 294]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 353]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 353], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["payment_id", 173], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 295]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 295 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 295], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 295 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 295], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]] SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 295], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 295], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 295]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 295]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 354]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 354], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["payment_id", 174], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 295], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 295]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 295]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 354]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 354], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["payment_id", 175], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 355]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 355], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["payment_id", 175], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 296]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 296 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 296], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 296 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 296], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 296], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 296], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 296]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 296]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 356]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 356], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["payment_id", 176], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 297]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 297 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 297], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (2.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 297 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 297], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 297], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 297], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 297]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 297]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 358]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 358], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["payment_id", 177], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 297], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 297]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 297]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 358]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 358], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["payment_id", 178], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 359]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 359], ["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["payment_id", 178], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 298]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 298 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 298], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 298 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 298], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 298], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 299]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 299 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 299], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 299 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 299], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 299], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.8ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 300]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 300 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 300], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 300 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 300], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:20:53 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 300], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:20:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (1.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (7.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:21:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:21:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 301]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 301 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:21:50 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 301], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:21:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (3.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:21:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:21:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 302]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 302 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:21:50 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 302], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:21:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:21:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:21:50 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 303]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 303 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:21:50 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 303], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:21:50 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 303 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:50 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 303], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:21:50 UTC +00:00]] SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:50 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 303], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:21:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:21:50 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:21:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 304]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 304 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:21:50 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 304], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:21:50 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 304 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:50 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 304], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:21:50 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:50 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 304], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:21:50 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 305]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 305 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 305], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 305 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 305], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 305], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.8ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 306]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 306 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 306], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 306 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 306], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 306], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 307]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 307 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 307], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 307 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 307], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 307], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 307], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 307]] Adherent::Adhesion Load (2.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 307]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 374]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 374], ["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["payment_id", 179], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 307], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 307]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 307]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 374]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 374], ["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["payment_id", 180], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 375]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 375], ["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["payment_id", 180], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 308]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 308 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 308], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 308 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 308], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 308], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 308], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 308]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 308]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 376]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 376], ["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["payment_id", 181], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 308], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 308]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 308]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 376]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 376], ["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["payment_id", 182], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 377]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 377], ["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["payment_id", 182], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 309]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 309 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 309], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 309 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 309], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 309], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 309], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 309]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 309]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 378]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 378], ["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["payment_id", 183], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.7ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 310]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 310 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 310], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 310 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 310], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 310], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 310], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 310]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 310]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 380]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 380], ["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["payment_id", 184], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 310], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 310]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 310]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 380]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 380], ["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["payment_id", 185], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 381]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 381], ["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["payment_id", 185], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 310], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 310]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 310]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 381]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 381], ["amount", #], ["created_at", Sat, 09 May 2015 13:21:51 UTC +00:00], ["payment_id", 186], ["updated_at", Sat, 09 May 2015 13:21:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 311]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 311 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:15 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 311], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.8ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 312]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 312 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:15 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 312], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:15 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 313]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 313 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:15 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 313], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 313 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 313], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 313], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 314]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 314 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 314], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 314 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 314], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 314], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 315]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 315 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 315], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 315 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 315], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 315], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 316]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 316 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 316], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 316 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 316], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 316], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 317]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 317 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 317], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 317 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 317], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 317], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 317], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]] Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 317]] Adherent::Adhesion Load (2.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 317]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 390]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 390], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["payment_id", 187], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 317], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 317]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 317]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 390]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 390], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["payment_id", 188], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 391]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 391], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["payment_id", 188], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 318]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 318 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 318], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 318 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 318], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 318], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 318], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 318]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 318]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 392]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 392], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["payment_id", 189], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 318], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 318]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 318]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 392]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 392], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["payment_id", 190], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 393]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 393], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["payment_id", 190], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 319]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 319 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 319], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 319 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 319], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 319], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 319], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 319]] Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 319]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 394]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 394], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["payment_id", 191], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 319], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 319]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 319]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 394]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 394], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["payment_id", 192], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 395]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 395], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["payment_id", 192], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 319], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 319]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 319]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 395]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 395], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["payment_id", 193], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 320]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 320 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 320], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 320 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 320], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 320], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 320], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 320]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 320]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 396]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 396], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:16 UTC +00:00], ["payment_id", 194], ["updated_at", Sat, 09 May 2015 13:22:16 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (8.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 321]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 321 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 321], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.7ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.7ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 322]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 322 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 322], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 323]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 323 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 323], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 323 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 323], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]] SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 323], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 324]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 324 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 324], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 324 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 324], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 324], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 324], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]] Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 324]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 324]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 400]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 400], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["payment_id", 195], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 325]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 325 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 325], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 325 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 325], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 325], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 325], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 325]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 325]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 402]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 402], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["payment_id", 196], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 325], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 325]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 325]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 402]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 402], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["payment_id", 197], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 403]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 403], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["payment_id", 197], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 326]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 326 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 326], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 326 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 326], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 326], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 326], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 326]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 326]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 404]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 404], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["payment_id", 198], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.9ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 326], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 326]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 326]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 404]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 404], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["payment_id", 199], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 405]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 405], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["payment_id", 199], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 326], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 326]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 326]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 405]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 405], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["payment_id", 200], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 327]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 327 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 327], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 327 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 327], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 327], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 327], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 327]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 327]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 406]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 406], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["payment_id", 201], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 327], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 327]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 327]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 406]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 406], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["payment_id", 202], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 407]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 407], ["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["payment_id", 202], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 328]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 328 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 328], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 328 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 328], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 328], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 329]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 329 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 329], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 329 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 329], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 329], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 330]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 330 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 330], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 330 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 330], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:22:28 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 330], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:22:28 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (21.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 331]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 331 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:02 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 331], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 332]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 332 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:02 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 332], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:02 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 333]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 333 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 333], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 333 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 333], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 333], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (2.1ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 334]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 334 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 334], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 334 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 334], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 334], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 335]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 335 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 335], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 335 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 335], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 335], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 336]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 336 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 336], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 336 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 336], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 336], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 337]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 337 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 337], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 337 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 337], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 337], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 337], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]] Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 337]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 337]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 422]] SQL (1.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 422], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["payment_id", 203], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 337], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 337]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 337]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 422]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 422], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["payment_id", 204], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 423]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 423], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["payment_id", 204], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 337], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 337]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 337]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 423]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 423], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["payment_id", 205], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.7ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 338]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 338 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 338], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 338 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 338], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]] SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 338], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 338], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 338]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 338]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 424]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 424], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["payment_id", 206], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 338], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 338]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 338]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 424]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 424], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["payment_id", 207], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 425]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 425], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["payment_id", 207], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.7ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 339]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 339 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 339], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 339 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 339], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 339], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 339], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 339]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 339]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 426]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 426], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["payment_id", 208], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 339], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 339]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 339]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 426]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 426], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["payment_id", 209], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 427]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 427], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["payment_id", 209], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.6ms) DELETE FROM "adherent_adhesions" SQL (0.3ms) DELETE FROM "adherent_payments" SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.6ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 340]]  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 340 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 340], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 340 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 340], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]] SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 340], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 340], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 340]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 340]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 428]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 428], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:03 UTC +00:00], ["payment_id", 210], ["updated_at", Sat, 09 May 2015 13:23:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.8ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (4.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 341]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 341 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 341], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 342]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 342 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 342], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (1.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 343]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 343 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 343], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 343 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 343], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 343], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.7ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 344]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 344 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 344], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 344 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 344], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 344], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 345]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 345 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 345], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 345 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 345], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 345], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 346]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 346 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 346], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 346 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 346], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 346], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 347]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 347 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 347], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 347 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 347], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 347], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 347], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]] Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 347]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 347]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 438]] SQL (1.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 438], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["payment_id", 211], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 347], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 347]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 347]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 438]] SQL (1.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 438], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["payment_id", 212], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 439]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 439], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["payment_id", 212], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.8ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 348]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 348 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 348], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 348 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 348], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 348], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 348], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 348]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 348]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 440]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 440], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["payment_id", 213], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 348], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 348]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 348]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 440]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 440], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["payment_id", 214], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 441]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 441], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["payment_id", 214], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 349]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 349 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 349], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 349 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 349], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 349], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 349], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 349]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 349]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 442]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 442], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["payment_id", 215], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.6ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 350]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 350 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 350], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 350 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 350], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 350], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 350], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 350]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 350]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 444]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 444], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["payment_id", 216], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 350], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 350]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 350]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 444]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 444], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["payment_id", 217], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 445]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 445], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["payment_id", 217], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 350], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 350]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 350]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 445]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 445], ["amount", #], ["created_at", Sat, 09 May 2015 13:23:19 UTC +00:00], ["payment_id", 218], ["updated_at", Sat, 09 May 2015 13:23:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.4ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.2ms) COMMIT  (1.0ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (2.2ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (2.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (5.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:24:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 351]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 351]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:42 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 351], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 351]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 351]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:24:42 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 352]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 352]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:42 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 352], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 352]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 352]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:24:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 353]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 353]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:42 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 353], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:42 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 353]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 353]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.4ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:24:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.5ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:24:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 09 May 2015 13:24:42 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:24:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:42 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 88], ["updated_at", Sat, 09 May 2015 13:24:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 88], ["updated_at", Sat, 09 May 2015 13:24:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 88) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 88) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:42 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 88], ["updated_at", Sat, 09 May 2015 13:24:42 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 357]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 357]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:42 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 357], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:42 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/357/payments/new" for 127.0.0.1 at 2015-05-09 15:24:42 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"357"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "357"]] Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 88]] Adherent::Adhesion Load (2.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 357]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 449]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (48.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (57.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (2.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (32.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.4ms) Completed 200 OK in 151ms (Views: 107.9ms | ActiveRecord: 11.5ms) Started POST "/adherent/members/357/payments" for 127.0.0.1 at 2015-05-09 15:24:43 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"357"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "357"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 357]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 88]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 357], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 357]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 449]] SQL (1.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 449], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["payment_id", 219], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/357/payments Completed 302 Found in 34ms (ActiveRecord: 8.0ms) Started GET "/adherent/members/357/payments" for 127.0.0.1 at 2015-05-09 15:24:43 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"357"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "357"]] Adherent::Payment Load (1.3ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 357]] Adherent::Reglement Load (1.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 219]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 449]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 357]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 219]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 219]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 219]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 219]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 357]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (46.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (55.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 66ms (Views: 53.5ms | ActiveRecord: 8.1ms) Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 357]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 219]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 219]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 89) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 89) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 89], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 89) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 89) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 89], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 89) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 89) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 89], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 360]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 360]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 360], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (1.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/360/payments/new" for 127.0.0.1 at 2015-05-09 15:24:43 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"360"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "360"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 89]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 360]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 450]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (18.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (19.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 22.7ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/360/payments" for 127.0.0.1 at 2015-05-09 15:24:43 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"360"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "360"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 360]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 89]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 360], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 360]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 450]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 450], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["payment_id", 220], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/360/payments Completed 302 Found in 26ms (ActiveRecord: 6.9ms) Started GET "/adherent/members/360/payments" for 127.0.0.1 at 2015-05-09 15:24:43 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"360"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "360"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 360]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 220]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 450]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 360]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 220]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 220]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 220]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 220]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 360]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (18.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (22.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 20.2ms | ActiveRecord: 5.9ms)  (1.3ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 360]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 90) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 90) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 90], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 90) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 90) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 90], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 90) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 90) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 90], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 363]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 363]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 363], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/363/payments/new" for 127.0.0.1 at 2015-05-09 15:24:43 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"363"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "363"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 90]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 363]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 451]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (13.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.4ms | ActiveRecord: 3.5ms) Started POST "/adherent/members/363/payments" for 127.0.0.1 at 2015-05-09 15:24:43 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"363"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "363"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 363]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 90]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 363], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 363]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 451]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 451], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["payment_id", 221], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/363/payments Completed 302 Found in 24ms (ActiveRecord: 6.1ms) Started GET "/adherent/members/363/payments" for 127.0.0.1 at 2015-05-09 15:24:43 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"363"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "363"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 363]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 221]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 451]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 363]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 221]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 221]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 221]] CACHE (0.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 221]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 363]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (19.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 18.9ms | ActiveRecord: 5.1ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 363]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 364]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 364]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 364], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 365]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 365]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 365], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/221/reglements/new" for 127.0.0.1 at 2015-05-09 15:24:43 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"221"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "221"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 363]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 221]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 221]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 221]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 221]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 364]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 452]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 365]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 453]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (22.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (29.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 44ms (Views: 31.3ms | ActiveRecord: 7.0ms)  (1.2ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 91) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 91) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 91], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 91) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 91) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 91], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 91) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 91) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 91], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 366]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 366]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 366], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/366/payments/new" for 127.0.0.1 at 2015-05-09 15:24:43 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"366"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "366"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 91]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 366]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 454]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 17.4ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/366/payments" for 127.0.0.1 at 2015-05-09 15:24:43 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"366"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "366"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 366]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 91]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 366], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 366]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 454]] SQL (2.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 454], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["payment_id", 222], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/366/payments Completed 302 Found in 25ms (ActiveRecord: 7.0ms) Started GET "/adherent/members/366/payments" for 127.0.0.1 at 2015-05-09 15:24:43 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"366"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "366"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 366]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 222]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 454]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 366]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 222]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 222]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 222]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 222]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 366]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (21.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (25.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 25.6ms | ActiveRecord: 5.5ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 366]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 367]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 367]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 367], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 368]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 368]]  (1.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 368], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/222/reglements/new" for 127.0.0.1 at 2015-05-09 15:24:43 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"222"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "222"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 366]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 222]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 222]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 222]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 222]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 367]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 455]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 368]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 456]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (24.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (28.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 45ms (Views: 28.6ms | ActiveRecord: 6.9ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 92) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 92) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 92], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 92) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 92) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 92], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 92) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 92) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 92], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 369]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 369]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 369], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/369/payments/new" for 127.0.0.1 at 2015-05-09 15:24:43 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"369"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "369"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 92]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 369]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 457]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (14.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 18.1ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/369/payments" for 127.0.0.1 at 2015-05-09 15:24:43 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"369"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "369"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 369]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 92]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 369], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 369]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 457]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 457], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["payment_id", 223], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/369/payments Completed 302 Found in 22ms (ActiveRecord: 6.2ms) Started GET "/adherent/members/369/payments" for 127.0.0.1 at 2015-05-09 15:24:43 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"369"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "369"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 369]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 223]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 457]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 369]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 223]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 223]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 223]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 223]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 369]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 17.2ms | ActiveRecord: 5.2ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 369]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 370]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 370]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 370], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 371]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 371]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:43 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 371], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:43 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/223/reglements/new" for 127.0.0.1 at 2015-05-09 15:24:43 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"223"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "223"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 369]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 223]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 223]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 223]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 223]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 370]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 458]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 371]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 459]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (24.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (29.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 41ms (Views: 29.0ms | ActiveRecord: 6.2ms) Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 369]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 369]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 223]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 223]]  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) COMMIT  (0.4ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 93], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 93], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 93) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 93) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 93], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 372]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 372]]  (0.5ms) SAVEPOINT active_record_1 SQL (2.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 372], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/372/payments/new" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"372"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "372"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 93]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 372]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 460]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (16.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (18.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 35ms (Views: 21.8ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/372/payments" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"372"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "372"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 372]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 93]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 372], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 372]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 460]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 460], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["payment_id", 224], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/372/payments Completed 302 Found in 22ms (ActiveRecord: 5.9ms) Started GET "/adherent/members/372/payments" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"372"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "372"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 372]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 224]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 460]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 372]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 224]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 224]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 224]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 224]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 372]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.3ms) Completed 200 OK in 25ms (Views: 17.6ms | ActiveRecord: 5.1ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 372]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 373]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 373]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 373], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 374]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 374]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 374], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/224/reglements/new" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"224"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "224"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 372]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 224]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 224]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 224]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 224]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 374]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 462]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 373]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 461]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (22.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (26.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 38ms (Views: 25.0ms | ActiveRecord: 6.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 94) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 94) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 94], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 94) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 94) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 94], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 94) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 94) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 94], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 375]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 375]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 375], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/375/payments/new" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"375"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "375"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 94]] Adherent::Adhesion Load (18.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 375]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 463]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (14.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 47ms (Views: 16.1ms | ActiveRecord: 20.2ms) Started POST "/adherent/members/375/payments" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"375"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "375"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 375]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 94]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 375], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 375]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 463]] SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 463], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["payment_id", 225], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/375/payments Completed 302 Found in 19ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/375/payments" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"375"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "375"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 375]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 225]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 463]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 375]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 225]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 225]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 225]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 225]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 375]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (17.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (20.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 18.6ms | ActiveRecord: 5.5ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 375]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 376]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 376]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 376], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 377]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 377]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 377], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/225/reglements/new" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"225"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "225"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 375]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 225]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 225]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 225]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 225]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 376]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 464]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 377]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 465]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (21.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (25.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 36ms (Views: 24.5ms | ActiveRecord: 6.4ms) Started POST "/adherent/payments/225/reglements" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"464"}, "commit"=>"Enregistrer", "payment_id"=>"225"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "225"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "464"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 225]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 225]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 464]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 464], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["payment_id", 225], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 375]] Redirected to http://www.example.com/adherent/members/375/payments Completed 302 Found in 16ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/375/payments" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"375"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "375"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 375]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 225]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 463]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 375]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 464]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 376]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 225]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 225]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 225]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 225]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 375]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (18.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (21.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 19.3ms | ActiveRecord: 5.8ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 95], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 95], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 95) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 95) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 95], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 378]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 378]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 378], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/378/payments/new" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"378"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "378"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 95]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 378]]  (1.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 466]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 14.8ms | ActiveRecord: 3.9ms) Started POST "/adherent/members/378/payments" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"378"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "378"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 378]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 95]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 378], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 378]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 466]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 466], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["payment_id", 226], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/378/payments Completed 302 Found in 22ms (ActiveRecord: 5.6ms) Started GET "/adherent/members/378/payments" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"378"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "378"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 378]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 226]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 466]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 378]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 226]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 226]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 226]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 226]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 378]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (17.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 17.6ms | ActiveRecord: 5.0ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 378]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 379]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 379]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 379], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 380]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 380]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 380], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/226/reglements/new" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"226"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "226"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 378]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 226]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 226]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 226]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 226]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 379]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 467]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 380]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 468]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (20.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (24.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 37ms (Views: 25.0ms | ActiveRecord: 6.3ms) Started POST "/adherent/payments/226/reglements" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"467"}, "commit"=>"Enregistrer", "payment_id"=>"226"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "226"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "467"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 226]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 226]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 467]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 467], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["payment_id", 226], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 378]] Redirected to http://www.example.com/adherent/members/378/payments Completed 302 Found in 14ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/378/payments" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"378"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "378"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 378]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 226]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 466]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 378]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 467]] Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 379]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 226]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 226]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 226]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 226]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 378]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (18.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (21.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 19.2ms | ActiveRecord: 6.8ms) Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 379]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 467]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 96], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 96], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 96) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 96) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 96], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 381]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 381]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 381], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/381/payments/new" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"381"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "381"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 96]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 381]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 469]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (12.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 14.9ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/381/payments" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"381"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "381"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 381]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 96]] SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 381], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 381]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 469]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 469], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["payment_id", 227], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/381/payments Completed 302 Found in 29ms (ActiveRecord: 6.8ms) Started GET "/adherent/members/381/payments" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"381"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "381"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 381]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 227]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 469]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 381]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 227]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 227]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 227]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 227]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 381]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (20.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 18.9ms | ActiveRecord: 4.8ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 381]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 382]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 382]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 382], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 383]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 383]]  (0.6ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 383], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/227/reglements/new" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"227"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "227"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 381]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 227]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 227]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 227]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 227]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 382]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 470]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 383]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 471]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (22.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (26.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 38ms (Views: 24.3ms | ActiveRecord: 6.9ms) Started POST "/adherent/payments/227/reglements" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"470"}, "commit"=>"Enregistrer", "payment_id"=>"227"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "227"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "470"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 227]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 227]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 470]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 470], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:44 UTC +00:00], ["payment_id", 227], ["updated_at", Sat, 09 May 2015 13:24:44 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 381]] Redirected to http://www.example.com/adherent/members/381/payments Completed 302 Found in 15ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/381/payments" for 127.0.0.1 at 2015-05-09 15:24:44 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"381"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "381"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 381]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 227]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 469]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 381]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 470]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 382]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 227]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 227]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 227]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 227]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 381]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (20.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (24.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 33ms (Views: 23.1ms | ActiveRecord: 6.1ms) Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 470]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 382]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 97], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 97], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 97) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 97) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 97], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 384]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 384]]  (0.5ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 384], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/384/payments/new" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"384"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "384"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 97]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 384]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 472]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (17.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (19.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 22.6ms | ActiveRecord: 3.3ms) Started POST "/adherent/members/384/payments" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"384"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "384"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 384]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 97]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 384], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 384]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 472]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 472], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["payment_id", 228], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/384/payments Completed 302 Found in 22ms (ActiveRecord: 5.9ms) Started GET "/adherent/members/384/payments" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"384"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "384"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 384]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 228]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 472]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 384]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 228]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 228]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 228]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 228]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 384]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (17.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (19.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 18.4ms | ActiveRecord: 5.1ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 384]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 385]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 385]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 385], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 386]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 386]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 386], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/228/reglements/new" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"228"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "228"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 384]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 228]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 228]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 228]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 228]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 385]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 473]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 386]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 474]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (20.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (25.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39ms (Views: 25.2ms | ActiveRecord: 6.5ms) Started POST "/adherent/payments/228/reglements" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"473"}, "commit"=>"Enregistrer", "payment_id"=>"228"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "228"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "473"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 228]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 228]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 473]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 473], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["payment_id", 228], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 384]] Redirected to http://www.example.com/adherent/members/384/payments Completed 302 Found in 19ms (ActiveRecord: 5.7ms) Started GET "/adherent/members/384/payments" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"384"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "384"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 384]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 228]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 472]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 384]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 473]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 385]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 228]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 228]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 228]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 228]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 384]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (21.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (24.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 22.4ms | ActiveRecord: 6.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 98], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (1.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 98], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 98) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 98) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 98], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (8.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 387]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 387]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 387], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/387/payments/new" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"387"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "387"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 98]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 387]]  (1.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 475]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (14.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 19.1ms | ActiveRecord: 4.7ms) Started POST "/adherent/members/387/payments" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"387"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "387"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 387]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 98]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 387], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 387]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 475]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 475], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["payment_id", 229], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/387/payments Completed 302 Found in 20ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/387/payments" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"387"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "387"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 387]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 229]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 475]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 387]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 229]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 229]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 229]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 229]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 387]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (20.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (25.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 24.2ms | ActiveRecord: 5.5ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 387]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 388]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 388]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 388], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 389]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 389]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 389], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/229/reglements/new" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"229"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "229"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 387]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 229]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 229]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 229]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 229]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 389]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 477]] Adherent::Member Load (2.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 388]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 476]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (23.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (27.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 38ms (Views: 24.3ms | ActiveRecord: 8.4ms) Started POST "/adherent/payments/229/reglements" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"476"}, "commit"=>"Enregistrer", "payment_id"=>"229"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "229"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "476"]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 229]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 229]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 476]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 476], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["payment_id", 229], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 387]] Redirected to http://www.example.com/adherent/members/387/payments Completed 302 Found in 14ms (ActiveRecord: 5.1ms) Started GET "/adherent/members/387/payments" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"387"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "387"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 387]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 229]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 475]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 387]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 476]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 388]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 229]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 229]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 229]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 229]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 387]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (25.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (30.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39ms (Views: 30.1ms | ActiveRecord: 4.8ms) Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 475]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 387]]  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 99], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 99], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 99) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 99) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 99], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 390]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 390]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 390], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/390/payments/new" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"390"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "390"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 99]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 390]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 478]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 15.8ms | ActiveRecord: 2.0ms) Started POST "/adherent/members/390/payments" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"390"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "390"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 390]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 99]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 390], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 390]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 478]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 478], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["payment_id", 230], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/390/payments Completed 302 Found in 28ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/390/payments" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"390"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "390"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 390]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 230]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 478]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 390]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 230]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 230]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 230]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 230]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 390]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (18.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (23.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 22.3ms | ActiveRecord: 4.5ms)  (0.4ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 100], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 100], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 100) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 100) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 100], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 393]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 393]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 393], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 393]] Started GET "/adherent/members/393/payments/new" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"393"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "393"]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 100]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 393]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 479]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (14.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (16.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 21.0ms | ActiveRecord: 1.9ms) Started POST "/adherent/members/393/payments" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"393"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "393"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 393]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 100]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 393], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 393]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 479]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 479], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["payment_id", 231], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/393/payments Completed 302 Found in 29ms (ActiveRecord: 6.0ms) Started GET "/adherent/members/393/payments" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"393"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "393"]] Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 393]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 231]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 479]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 393]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 231]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 231]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 231]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 231]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 393]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 18.6ms | ActiveRecord: 4.0ms)  (0.5ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 393]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 101], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 101], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 101) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 101) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 101], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 396]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 396]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 396], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/396/payments/new" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"396"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "396"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 101]] Adherent::Adhesion Load (0.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 396]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 480]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (17.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 19.8ms | ActiveRecord: 2.3ms) Started POST "/adherent/members/396/payments" for 127.0.0.1 at 2015-05-09 15:24:45 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"396"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "396"]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 396]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 101]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 396], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 396]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 480]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 480], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:45 UTC +00:00], ["payment_id", 232], ["updated_at", Sat, 09 May 2015 13:24:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/396/payments Completed 302 Found in 20ms (ActiveRecord: 4.0ms) Started GET "/adherent/members/396/payments" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"396"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "396"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 396]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 232]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 480]] Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 396]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 232]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 232]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 232]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 232]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 396]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (19.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 19.7ms | ActiveRecord: 3.8ms)  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 396]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 102], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 102], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 102) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 102) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 102], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 399]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 399]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 399], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/399/payments/new" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"399"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "399"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 102]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 399]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 481]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (20.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (22.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 26.1ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/399/payments" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"399"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "399"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 399]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 102]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 399], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 399]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 481]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 481], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["payment_id", 233], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/399/payments Completed 302 Found in 28ms (ActiveRecord: 5.4ms) Started GET "/adherent/members/399/payments" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"399"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "399"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 399]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 233]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 481]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 399]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 233]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 233]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 233]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 233]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 399]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (17.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.9ms | ActiveRecord: 5.0ms) Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 399]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 481]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 103], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 103], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 103) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 103) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 103], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 402]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 402]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 402], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/402/payments/new" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"402"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "402"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 103]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 402]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 482]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (13.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 15.6ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/402/payments" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"402"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "402"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 402]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 103]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 402], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 402]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 482]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 482], ["amount", #], ["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["payment_id", 234], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/402/payments Completed 302 Found in 25ms (ActiveRecord: 6.0ms) Started GET "/adherent/members/402/payments" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"402"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "402"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 402]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 234]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 482]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 402]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 234]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 234]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 234]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 234]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 402]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (15.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.5ms | ActiveRecord: 4.5ms)  (1.1ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 402]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/allpayments/index.html.haml within layouts/adherent/application (0.7ms) Completed 200 OK in 19ms (Views: 5.1ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 105) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 105) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 105], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (2.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 405], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/405/adhesions" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"405"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "405"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 405]] Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 405]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 483]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 483]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 44ms (Views: 36.1ms | ActiveRecord: 3.9ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 106) LIMIT 1  (0.8ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 106) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 106], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 406], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/406/adhesions" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"406"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "406"]] Adherent::Adhesion Exists (1.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 406]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 406]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 484]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 484]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 14.7ms | ActiveRecord: 4.4ms) Started GET "/adherent/members/406/payments/new" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"406"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "406"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 106]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 406]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 484]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 14.5ms | ActiveRecord: 3.1ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 107) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 107) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 107], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 407], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/407/adhesions" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"407"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "407"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 407]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 407]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 485]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 485]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 14ms (Views: 8.9ms | ActiveRecord: 2.5ms) Started GET "/adherent/members/407/adhesions/485/edit" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"407", "id"=>"485"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "407"]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 407], ["id", "485"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 18.8ms | ActiveRecord: 2.6ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 108) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 108) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 108], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/408/adhesions/new" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"408"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "408"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 408]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 408]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 13.5ms | ActiveRecord: 2.1ms)  (1.7ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 408]] Started POST "/adherent/members/408/adhesions" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"408"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "408"]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 408], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/408/adhesions Completed 302 Found in 14ms (ActiveRecord: 3.1ms) Started GET "/adherent/members/408/adhesions" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"408"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "408"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 408]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 408]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 486]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 486]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 9.8ms | ActiveRecord: 3.2ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 408]] SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 109) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 109) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 109], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/409/adhesions/new" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"409"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "409"]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 409]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 409]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (11.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.6ms | ActiveRecord: 2.0ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 110) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 110) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 110], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 410]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 410]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 410], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 410]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 110]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 410], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 410]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/410/payments" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"410"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "410"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 410]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 235]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 235]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 235]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 235]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 235]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 410]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 14.3ms | ActiveRecord: 4.4ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.6ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 111) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 111) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 111], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 411]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 411]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 411], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 411]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 111]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 411], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 411]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/411/payments" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"411"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "411"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 411]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 236]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 236]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 236]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 236]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 236]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 411]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (9.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 13.5ms | ActiveRecord: 3.8ms) Started GET "/adherent/payments/236/reglements/new" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"236"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "236"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 411]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 236]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 236]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 236]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 236]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (9.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 14.9ms | ActiveRecord: 4.7ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 112) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 112) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 112], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 412]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 412]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 412], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 412]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 112]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:46 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 412], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:46 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 412]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/412/payments/237" for 127.0.0.1 at 2015-05-09 15:24:46 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"412", "id"=>"237"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "412"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 237 LIMIT 1 [["member_id", 412]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 237]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 237]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 412]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 237]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 237]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 237]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (8.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40ms (Views: 30.4ms | ActiveRecord: 4.7ms) SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 113) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 113) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 113], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 413]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 413]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 413], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 413]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 113]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 413], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 413]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/413/payments/238" for 127.0.0.1 at 2015-05-09 15:24:47 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"413", "id"=>"238"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "413"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 238 LIMIT 1 [["member_id", 413]] Adherent::Reglement Load (1.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 238]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 238]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 413]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 238]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 238]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 238]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (3.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 18.9ms | ActiveRecord: 5.8ms) SQL (0.8ms) DELETE FROM "adherent_payments" SQL (1.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 114) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 114) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 114], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 414]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 414]]  (0.7ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 414], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 414]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 114]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 414], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 414]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/414/payments/239" for 127.0.0.1 at 2015-05-09 15:24:47 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"414", "id"=>"239"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "414"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 239 LIMIT 1 [["member_id", 414]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 239]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 239]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 414]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 239]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 239]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 239]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 12.9ms | ActiveRecord: 4.6ms) SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 115) LIMIT 1  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 115) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 115], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 415]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 415]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 415], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/415/payments/new" for 127.0.0.1 at 2015-05-09 15:24:47 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"415"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "415"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 115]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 415]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.4ms | ActiveRecord: 2.3ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 415]] Started POST "/adherent/members/415/payments" for 127.0.0.1 at 2015-05-09 15:24:47 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"415"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "415"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 415]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 115]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 415], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 415]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/415/payments Completed 302 Found in 16ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/415/payments" for 127.0.0.1 at 2015-05-09 15:24:47 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"415"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "415"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 415]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 240]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 240]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 240]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 240]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 240]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 415]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 13.1ms | ActiveRecord: 3.8ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 415]] SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 116) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 116) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 116], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 416]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 416]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 416], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/416/payments/new" for 127.0.0.1 at 2015-05-09 15:24:47 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"416"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "416"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 116]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 416]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.5ms | ActiveRecord: 2.0ms) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 117) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 117) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 117], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 417]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 417]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 417], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/417/payments/new" for 127.0.0.1 at 2015-05-09 15:24:47 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"417"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "417"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 117]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 417]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 15.7ms | ActiveRecord: 2.0ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 118) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 118) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 118], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 418]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 418]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 418], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/418/payments/new" for 127.0.0.1 at 2015-05-09 15:24:47 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"418"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "418"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 118]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 418]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (13.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 17.8ms | ActiveRecord: 2.3ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.8ms | ActiveRecord: 1.9ms)  (0.5ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.2ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 122) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 122], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/419/coord/new Completed 302 Found in 16ms (ActiveRecord: 5.1ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 123) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 123], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/420/coord/new Completed 302 Found in 15ms (ActiveRecord: 4.6ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 124) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 124], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/421/coord/new Completed 302 Found in 13ms (ActiveRecord: 4.1ms)  (0.4ms) ROLLBACK  (0.8ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.1ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.0ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5f8651a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5f623e0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 5ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"422"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.0ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 422 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 422 [["name", "Dalton"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/422 Completed 302 Found in 18ms (ActiveRecord: 5.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"423"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/423 Completed 302 Found in 8ms (ActiveRecord: 2.2ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (2.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"424"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/424 Completed 302 Found in 7ms (ActiveRecord: 2.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"425"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 1.4ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (1.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.1ms | ActiveRecord: 3.1ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#index as XLS Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 134;  Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 134; Sent data Mon association-09-mai-2015-Membres.csv (1.6ms) Completed 200 OK in 15ms (Views: 1.3ms | ActiveRecord: 4.3ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 135;  Completed 200 OK in 10ms (Views: 1.7ms | ActiveRecord: 3.3ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 136; Adherent::QueryMember Load (1.8ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 136;  Sent data Mon association-09-mai-2015-Membres.csv (0.6ms) Completed 200 OK in 13ms (Views: 0.4ms | ActiveRecord: 6.2ms)  (0.3ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 1.2ms | ActiveRecord: 2.4ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5db964c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (1.8ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 2.0ms | ActiveRecord: 3.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d9c704 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5d9c704%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d76fa4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.9ms | ActiveRecord: 2.5ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d5f3ae @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5d5f3ae%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d27ce2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 2.1ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"09/05/2016", "from_date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5d05854 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5d05854%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"09/05/2016", "from_date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5cd94f2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5cd94f2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 1.5ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"09/05/2016", "from_date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x5cc0bf0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 1.3ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5c54130 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5c54130%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 7ms (ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5bea460 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.1ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5bc4d3c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5bac188 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5b8d1c0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.9ms | ActiveRecord: 3.0ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5b6d744 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 5.3ms | ActiveRecord: 2.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5b46888 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5b46888%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 6ms (ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5b0c91c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.1ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (1.5ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ae92a0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.8ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5ae92a0%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 13ms (ActiveRecord: 4.2ms)  (1.6ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x5ab9d02 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.5ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x5a90736 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x5a7a774 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x5a7a774%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5a56572 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.7ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5a2a8fa @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x5a0a5a0 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.0ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x59e1970 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x597f8ec @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x597f928%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 7ms (ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x59533fa @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x5925b3a @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.9ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 165) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 165) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 165], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/426/coord/new" for 127.0.0.1 at 2015-05-09 15:24:48 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"426"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "426"]] Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 426]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (24.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 57ms (Views: 30.2ms | ActiveRecord: 6.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/426/coord" for 127.0.0.1 at 2015-05-09 15:24:48 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"426"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "426"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 426]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 426], ["office", ""], ["tel", ""], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["zip", ""]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/426/adhesions/new Completed 302 Found in 13ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/426/adhesions/new" for 127.0.0.1 at 2015-05-09 15:24:48 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"426"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "426"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 426]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 426]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 19ms (Views: 12.1ms | ActiveRecord: 2.2ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.6ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 166) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 166) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 166], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/427/coord/new" for 127.0.0.1 at 2015-05-09 15:24:48 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"427"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "427"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 427]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (21.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 24.6ms | ActiveRecord: 1.6ms) Started POST "/adherent/members/427/coord" for 127.0.0.1 at 2015-05-09 15:24:48 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"427"} Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "427"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 427]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 427], ["office", ""], ["tel", ""], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/427/adhesions/new Completed 302 Found in 12ms (ActiveRecord: 4.3ms) Started GET "/adherent/members/427/adhesions/new" for 127.0.0.1 at 2015-05-09 15:24:48 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"427"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "427"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 427]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 427]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (15.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 22.4ms | ActiveRecord: 2.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 167) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 167) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 167], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/428/coord/new" for 127.0.0.1 at 2015-05-09 15:24:48 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"428"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "428"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 428]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (32.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 46ms (Views: 37.9ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 168) LIMIT 1  (0.9ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 168) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 168], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/429/coord/new" for 127.0.0.1 at 2015-05-09 15:24:48 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"429"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "429"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 429]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (21.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 24.7ms | ActiveRecord: 1.6ms) Started POST "/adherent/members/429/coord" for 127.0.0.1 at 2015-05-09 15:24:48 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"429"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "429"]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 429]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 429], ["office", ""], ["tel", ""], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/429/adhesions/new Completed 302 Found in 11ms (ActiveRecord: 3.5ms) Started GET "/adherent/members/429/adhesions/new" for 127.0.0.1 at 2015-05-09 15:24:48 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"429"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "429"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 429]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 429]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (8.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 11.8ms | ActiveRecord: 2.2ms) Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 429]]  (0.5ms) ROLLBACK SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 169) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 169) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 169], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 169) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 169) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 169], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 169) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 169) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 169], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 169) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 169) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 169], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 169) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 169) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 169], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 430]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 430]]  (0.3ms) BEGIN SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:24:48 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 430], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:24:48 UTC +00:00]]  (1.2ms) COMMIT Started GET "/adherent/members/430/adhesions" for 127.0.0.1 at 2015-05-09 15:24:53 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"430"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "430"]] Adherent::Adhesion Exists (1.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 430]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 430]]  (1.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 496]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 496]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 45ms (Views: 21.3ms | ActiveRecord: 16.7ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-05-09 15:24:53 +0200 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-05-09 15:24:53 +0200 Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-05-09 15:24:54 +0200 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-05-09 15:24:54 +0200 Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-05-09 15:24:54 +0200 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-05-09 15:24:54 +0200 Started DELETE "/adherent/members/430/adhesions/496" for 127.0.0.1 at 2015-05-09 15:24:55 +0200 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"430", "id"=>"496"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "430"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 430], ["id", "496"]]  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 496]]  (147.7ms) COMMIT Redirected to http://127.0.0.1:53520/adherent/members/430/adhesions Completed 302 Found in 159ms (ActiveRecord: 150.2ms) Started GET "/adherent/members/430/adhesions" for 127.0.0.1 at 2015-05-09 15:24:55 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"430"} Organism Load (1.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "430"]] Adherent::Adhesion Exists (1.7ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 430]] Redirected to http://127.0.0.1:53520/adherent/members/430/adhesions/new Completed 302 Found in 22ms (ActiveRecord: 13.4ms) Started GET "/adherent/members/430/adhesions/new" for 127.0.0.1 at 2015-05-09 15:24:55 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"430"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "430"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 430]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 430]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (18.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 24.2ms | ActiveRecord: 3.4ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-05-09 15:24:56 +0200  (0.8ms) SELECT COUNT(*) FROM "adherent_adhesions"  (0.6ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (1.9ms) select table_name from information_schema.views where table_schema = 'adh_test'  (289.0ms) TRUNCATE TABLE "adherent_members", "adherent_adhesions", "adherent_coords", "organisms", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (0.8ms) ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:56 UTC +00:00]]  (2.6ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (1.0ms) BEGIN Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:24:57 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:24:57 UTC +00:00]]  (2.3ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:24:57 UTC +00:00]]  (2.7ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:24:57 UTC +00:00]]  (9.1ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:57 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:24:57 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:24:57 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (4.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 66ms (Views: 36.0ms | ActiveRecord: 6.3ms) Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-05-09 15:24:57 +0200 Started GET "/assets/adherent/icones/xls.png" for 127.0.0.1 at 2015-05-09 15:24:57 +0200 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-05-09 15:24:57 +0200 Started GET "/assets/adherent/icones/csv.png" for 127.0.0.1 at 2015-05-09 15:24:57 +0200 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-05-09 15:24:57 +0200 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-05-09 15:24:57 +0200 Started GET "/frenchdatatable.txt" for 127.0.0.1 at 2015-05-09 15:24:57 +0200 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-05-09 15:24:57 +0200 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2015-05-09 15:24:58 +0200 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.4ms) BEGIN Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] SQL (0.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (135.8ms) COMMIT Redirected to http://127.0.0.1:53520/adherent/members Completed 302 Found in 149ms (ActiveRecord: 140.4ms) Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:24:58 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 20.8ms | ActiveRecord: 3.2ms) Started GET "/frenchdatatable.txt" for 127.0.0.1 at 2015-05-09 15:24:58 +0200  (0.8ms) SELECT COUNT(*) FROM "adherent_members"  (1.5ms) ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (1.9ms) select table_name from information_schema.views where table_schema = 'adh_test'  (226.5ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.1ms) BEGIN SQL (1.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:24:59 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:24:59 UTC +00:00]]  (104.6ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:25:00 UTC +00:00]]  (2.0ms) COMMIT Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (3.9ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:25:00 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:25:00 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:25:00 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:00 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:25:00 UTC +00:00]]  (1.1ms) COMMIT Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) BEGIN Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:00 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Sat, 09 May 2015 13:25:00 UTC +00:00]] Adherent::Adhesion Load (2.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (1.4ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-05-09 15:25:00 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 1]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (3.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 19.5ms | ActiveRecord: 6.2ms) Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-05-09 15:25:00 +0200 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-05-09 15:25:00 +0200 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-05-09 15:25:00 +0200 Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-05-09 15:25:01 +0200 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN Adherent::Reglement Load (1.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] SQL (1.1ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (144.9ms) COMMIT Redirected to http://127.0.0.1:53520/adherent/members/1/payments Completed 302 Found in 171ms (ActiveRecord: 160.0ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2015-05-09 15:25:01 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Rendered collection (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 44ms (Views: 7.3ms | ActiveRecord: 4.8ms)  (1.3ms) SELECT COUNT(*) FROM "adherent_payments"  (1.1ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (1.8ms) select table_name from information_schema.views where table_schema = 'adh_test'  (157.3ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_reglements", "organisms", "adherent_payments" RESTART IDENTITY CASCADE;  (1.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 1], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 1], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] SQL (1.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 1], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (1.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 2], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 2]] Adherent::Adhesion Load (1.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 2]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 2], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT COUNT(*) FROM "adherent_payments"  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 2]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 2]]  (0.5ms) ROLLBACK TO SAVEPOINT active_record_1  (2.2ms) SELECT COUNT(*) FROM "adherent_payments"  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 3], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 3]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 3]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 3], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 3]] Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 3]]  (0.4ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (2.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.9ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (2.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 4], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 4]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 4], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 4]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 4]] SQL (1.1ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 4], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] SQL (1.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 7], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["payment_id", 2], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 8], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["payment_id", 2], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 5], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 5], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 5]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 5], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 5]] SQL (1.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 5], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 5]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 9], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["payment_id", 3], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 10], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:02 UTC +00:00], ["payment_id", 3], ["updated_at", Sat, 09 May 2015 13:25:02 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.7ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 6], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 6], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 6], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 7], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 6]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 7], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] SQL (0.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 12], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["payment_id", 4], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 6]] Organism Load (0.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 6]] SQL (0.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 6], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 6]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 11], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["payment_id", 5], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.5ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 7], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 7], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 8], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 9], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 9]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 7]] SQL (1.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 9], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]] Adherent::Adhesion Load (4.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 9]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 14], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["payment_id", 6], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 8], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 8], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 10], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 11], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 8]] SQL (1.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 11], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]] Adherent::Adhesion Load (1.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]]  (1.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] SQL (1.3ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 16], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 8]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 11], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 16], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 10]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 8]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 10], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 10]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 15], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.5ms) DELETE FROM "adherent_members"  (0.8ms) ROLLBACK  (0.9ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) COMMIT  (0.3ms) BEGIN  (1.6ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 17], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 18], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]]  (0.3ms) ROLLBACK  (1.4ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 19], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.6ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.7ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.6ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 9], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 9], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 9], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 9], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 9], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:25:03 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (3.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 9; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (5.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (6.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (2.9ms) Completed 200 OK in 65ms (Views: 59.7ms | ActiveRecord: 3.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 10], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 10], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 10], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 10], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 10], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:25:03 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 10; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.6ms) Completed 200 OK in 27ms (Views: 21.8ms | ActiveRecord: 2.3ms)  (0.6ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 11], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 11], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1  (1.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 11], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 11], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 11], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2015-05-09 15:25:03 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (18.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 27.9ms | ActiveRecord: 0.8ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2015-05-09 15:25:03 +0200 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 11], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/27/coord/new Completed 302 Found in 13ms (ActiveRecord: 3.1ms) Started GET "/adherent/members/27/coord/new" for 127.0.0.1 at 2015-05-09 15:25:03 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"27"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "27"]] Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (26.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39ms (Views: 33.7ms | ActiveRecord: 1.9ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_members"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 12], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 12], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 12], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 12], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 12], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:25:03 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.8ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 12;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (24.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 47ms (Views: 41.0ms | ActiveRecord: 3.4ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 28]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 28]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:03 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 28], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:25:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/28/adhesions" for 127.0.0.1 at 2015-05-09 15:25:03 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"28"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "28"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 28]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 28]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 21.4ms | ActiveRecord: 3.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 13], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 13], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 13], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 13], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 13], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:25:04 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.5ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 13;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 19.7ms | ActiveRecord: 2.3ms) Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/33/payments" for 127.0.0.1 at 2015-05-09 15:25:04 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"33"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "33"]] Adherent::Payment Load (1.1ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 33]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 17ms (Views: 11.7ms | ActiveRecord: 2.5ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 14], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 14], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 14], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 14], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:25:04 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 14;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 21.4ms | ActiveRecord: 2.3ms) Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["member_id", 38], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 38]] Started GET "/adherent/members/38/coord" for 127.0.0.1 at 2015-05-09 15:25:04 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"38"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "38"]] Adherent::Coord Load (1.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 38]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 14ms (Views: 8.1ms | ActiveRecord: 2.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 15], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 15], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 15], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 15], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:25:04 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 15;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 16.9ms | ActiveRecord: 2.9ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2015-05-09 15:25:04 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 16.6ms | ActiveRecord: 0.7ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 16], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 16], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 16], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 16], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 16], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:25:04 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 16; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 24.1ms | ActiveRecord: 1.9ms) Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/48/edit" for 127.0.0.1 at 2015-05-09 15:25:04 +0200 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"48"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "48"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (13.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 18.7ms | ActiveRecord: 1.7ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 17], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 17], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 17], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 17], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 17], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:25:04 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (3.1ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 17;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 19.0ms | ActiveRecord: 3.8ms) Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/53/coord" for 127.0.0.1 at 2015-05-09 15:25:04 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"53"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "53"]] Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 53]] Redirected to http://www.example.com/adherent/members/53/coord/new Completed 302 Found in 8ms (ActiveRecord: 4.1ms) Started GET "/adherent/members/53/coord/new" for 127.0.0.1 at 2015-05-09 15:25:04 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"53"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "53"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 53]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (29.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39ms (Views: 33.2ms | ActiveRecord: 1.8ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 18], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 18], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 18], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 18], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:25:04 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 18; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 16.9ms | ActiveRecord: 2.2ms) Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/58/adhesions" for 127.0.0.1 at 2015-05-09 15:25:04 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"58"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "58"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 58]] Redirected to http://www.example.com/adherent/members/58/adhesions/new Completed 302 Found in 7ms (ActiveRecord: 2.2ms) Started GET "/adherent/members/58/adhesions/new" for 127.0.0.1 at 2015-05-09 15:25:04 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"58"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "58"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 58]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 58]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 19.6ms | ActiveRecord: 2.4ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x4b6afd6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 3.3ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x4ae91a2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x4ae3180 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 2.8ms | ActiveRecord: 2.8ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x4a3f0c6 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x49ccf62 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.5ms | ActiveRecord: 1.7ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x494be4e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x494be4e%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 8ms (ActiveRecord: 2.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x491461a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x491461a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 7ms (ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x48f4072 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.4ms | ActiveRecord: 2.5ms)  (0.6ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["member_id", 63], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["zip", 59000]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 63]]  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) SAVEPOINT active_record_1 SQL (1.4ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 2]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 63]] SQL (0.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 63]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.6ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 64]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 64 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 64], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.8ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 65]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 65 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 65], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 66]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 66 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 66], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 66 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 66], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 66], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 67]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 67 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 67], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 67 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 67], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:04 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 67], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:25:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 68]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 68 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 68], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 68 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 68], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 68], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.8ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 69]]  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 69 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 69], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 69 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 69], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 69], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 70]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 70 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 70], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 70 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 70], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 70], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (2.3ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 70], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 70]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 70]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 29], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 70], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 70]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 70]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 29], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 30], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.7ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 71]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 71 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 71], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 71 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 71], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 71], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 71], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 71]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 71]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 31], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["payment_id", 12], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 71], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 71]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 71]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 31], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["payment_id", 13], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 32], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["payment_id", 13], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 72]]  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 72 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 72], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 72 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 72], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]] SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 72], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 72], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 72]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 72]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 33], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["payment_id", 14], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.3ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 73]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 73 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 73], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 73 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 73], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 73], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 73], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 73]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 73]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 35], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["payment_id", 15], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 73], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 73]] Adherent::Adhesion Load (3.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 73]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 35]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 35], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["payment_id", 16], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 36], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["payment_id", 16], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 73], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 73]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 73]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 36]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 36], ["amount", #], ["created_at", Sat, 09 May 2015 13:25:05 UTC +00:00], ["payment_id", 17], ["updated_at", Sat, 09 May 2015 13:25:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (1.0ms) DELETE FROM "adherent_reglements" SQL (0.5ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK SQL (1.0ms) DELETE FROM "adherent_members" Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) BEGIN SQL (5.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:28:40 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:28:40 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (1.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:28:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Sat, 09 May 2015 13:28:40 UTC +00:00]]  (1.7ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:28:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 26], ["updated_at", Sat, 09 May 2015 13:28:40 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:28:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 26], ["updated_at", Sat, 09 May 2015 13:28:40 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:28:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 26], ["updated_at", Sat, 09 May 2015 13:28:40 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:28:40 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 26], ["updated_at", Sat, 09 May 2015 13:28:40 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 74]] Adherent::Adhesion Load (1.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 74]]  (0.3ms) BEGIN SQL (1.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:28:40 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 74], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:28:40 UTC +00:00]]  (1.8ms) COMMIT Started GET "/adherent/members/74/adhesions" for 127.0.0.1 at 2015-05-09 15:28:46 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"74"} Organism Load (1.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "74"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 74]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 74]]  (1.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (39.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (3.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (31.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.6ms) Completed 200 OK in 119ms (Views: 91.0ms | ActiveRecord: 18.1ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-05-09 15:28:46 +0200 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-05-09 15:28:46 +0200 Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-05-09 15:28:46 +0200 Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-05-09 15:28:46 +0200 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-05-09 15:28:46 +0200 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-05-09 15:28:46 +0200 Started DELETE "/adherent/members/74/adhesions/37" for 127.0.0.1 at 2015-05-09 15:28:48 +0200 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"74", "id"=>"37"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "74"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 74], ["id", "37"]]  (0.2ms) BEGIN SQL (0.8ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 37]]  (39.5ms) COMMIT Redirected to http://127.0.0.1:47321/adherent/members/74/adhesions Completed 302 Found in 52ms (ActiveRecord: 42.3ms) Started GET "/adherent/members/74/adhesions" for 127.0.0.1 at 2015-05-09 15:28:48 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"74"} Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "74"]] Adherent::Adhesion Exists (1.2ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 74]] Redirected to http://127.0.0.1:47321/adherent/members/74/adhesions/new Completed 302 Found in 25ms (ActiveRecord: 14.6ms) Started GET "/adherent/members/74/adhesions/new" for 127.0.0.1 at 2015-05-09 15:28:48 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"74"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "74"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 74]] Adherent::Adhesion Load (1.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 74]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (63.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (68.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 83ms (Views: 73.4ms | ActiveRecord: 3.0ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-05-09 15:28:48 +0200  (1.2ms) SELECT COUNT(*) FROM "adherent_adhesions"  (1.4ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (1.8ms) select table_name from information_schema.views where table_schema = 'adh_test'  (161.0ms) TRUNCATE TABLE "adherent_coords", "adherent_members", "adherent_adhesions", "organisms", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (0.6ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (1.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:28:49 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:28:49 UTC +00:00]]  (114.7ms) COMMIT Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (2.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:28:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:28:49 UTC +00:00]]  (2.3ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:28:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:28:49 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.7ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:28:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:28:49 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:28:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:28:49 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:28:49 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:28:49 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) BEGIN Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.6ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:28:49 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Sat, 09 May 2015 13:28:49 UTC +00:00]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (1.8ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-05-09 15:28:49 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 1]] Adherent::Reglement Load (1.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (10.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (40.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 61ms (Views: 40.8ms | ActiveRecord: 11.6ms) Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-05-09 15:28:50 +0200 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-05-09 15:28:50 +0200 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-05-09 15:28:50 +0200 Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-05-09 15:28:50 +0200 Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-05-09 15:28:50 +0200 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN Adherent::Reglement Load (1.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] SQL (0.8ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (121.4ms) COMMIT Redirected to http://127.0.0.1:47321/adherent/members/1/payments Completed 302 Found in 136ms (ActiveRecord: 125.5ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2015-05-09 15:28:51 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (8.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.6ms | ActiveRecord: 5.5ms)  (1.0ms) SELECT COUNT(*) FROM "adherent_payments"  (1.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (2.6ms) select table_name from information_schema.views where table_schema = 'adh_test'  (214.8ms) TRUNCATE TABLE "adherent_coords", "adherent_members", "adherent_adhesions", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) BEGIN SQL (1.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:28:52 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:28:52 UTC +00:00]]  (115.8ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:28:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:28:52 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:28:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:28:52 UTC +00:00]]  (0.8ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:28:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:28:52 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:28:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:28:52 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:28:52 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:28:52 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:28:52 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (38.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 96ms (Views: 44.7ms | ActiveRecord: 4.4ms) Started GET "/assets/adherent/icones/xls.png" for 127.0.0.1 at 2015-05-09 15:28:52 +0200 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-05-09 15:28:52 +0200 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-05-09 15:28:52 +0200 Started GET "/assets/adherent/icones/csv.png" for 127.0.0.1 at 2015-05-09 15:28:52 +0200 Started GET "/frenchdatatable.txt" for 127.0.0.1 at 2015-05-09 15:28:53 +0200 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-05-09 15:28:53 +0200 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-05-09 15:28:53 +0200 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2015-05-09 15:28:54 +0200 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (3.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.2ms) BEGIN Adherent::Coord Load (1.0ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] SQL (0.5ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (121.4ms) COMMIT Redirected to http://127.0.0.1:47321/adherent/members Completed 302 Found in 147ms (ActiveRecord: 129.6ms) Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:28:54 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (4.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (20.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 22.8ms | ActiveRecord: 4.7ms) Started GET "/frenchdatatable.txt" for 127.0.0.1 at 2015-05-09 15:28:54 +0200  (1.2ms) SELECT COUNT(*) FROM "adherent_members"  (2.1ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (2.2ms) select table_name from information_schema.views where table_schema = 'adh_test'  (126.5ms) TRUNCATE TABLE "adherent_members", "adherent_adhesions", "adherent_coords", "adherent_reglements", "organisms", "adherent_payments" RESTART IDENTITY CASCADE;  (1.2ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL SQL (0.9ms) DELETE FROM "adherent_members" Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.1ms) BEGIN SQL (7.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:32:46 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:32:46 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:32:47 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:32:47 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:32:47 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:32:47 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:32:47 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:32:47 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:32:47 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:32:47 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:32:47 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:32:47 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:32:51 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.7ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (47.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (4.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (43.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.9ms) Completed 200 OK in 165ms (Views: 119.6ms | ActiveRecord: 11.0ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-05-09 15:32:52 +0200 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-05-09 15:32:52 +0200 Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-05-09 15:32:52 +0200 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-05-09 15:32:52 +0200 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-05-09 15:32:52 +0200 Started GET "/assets/adherent/icones/csv.png" for 127.0.0.1 at 2015-05-09 15:32:52 +0200 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-05-09 15:32:52 +0200 Started GET "/assets/adherent/icones/xls.png" for 127.0.0.1 at 2015-05-09 15:32:52 +0200 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-05-09 15:32:52 +0200 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-05-09 15:32:52 +0200 Started GET "/frenchdatatable.txt" for 127.0.0.1 at 2015-05-09 15:32:52 +0200 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-05-09 15:32:52 +0200 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-05-09 15:32:52 +0200  (1.1ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (3.0ms) select table_name from information_schema.views where table_schema = 'adh_test'  (187.1ms) TRUNCATE TABLE "adherent_members", "adherent_adhesions", "adherent_coords", "organisms", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (1.1ms) ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (1.1ms) DELETE FROM "adherent_members" Organism Load (3.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) BEGIN SQL (1.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:32:53 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:32:53 UTC +00:00]]  (121.0ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:32:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:32:53 UTC +00:00]]  (2.5ms) COMMIT Adherent::Member Exists (1.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:32:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:32:53 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (2.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:32:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:32:53 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:32:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:32:53 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:32:53 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:32:53 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) BEGIN Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:32:53 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Sat, 09 May 2015 13:32:53 UTC +00:00]] Adherent::Adhesion Load (4.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (110.4ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-05-09 15:32:53 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 1]] Adherent::Reglement Load (2.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (1.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (9.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (38.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 66ms (Views: 34.9ms | ActiveRecord: 20.7ms) Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-05-09 15:32:53 +0200 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-05-09 15:32:53 +0200 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-05-09 15:32:53 +0200 Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-05-09 15:32:54 +0200 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.1ms) BEGIN Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] SQL (0.6ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (121.9ms) COMMIT Redirected to http://127.0.0.1:43370/adherent/members/1/payments Completed 302 Found in 135ms (ActiveRecord: 125.0ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2015-05-09 15:32:55 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (2.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Rendered collection (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (9.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 11.2ms | ActiveRecord: 6.6ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-05-09 15:32:55 +0200  (1.0ms) SELECT COUNT(*) FROM "adherent_payments"  (0.7ms) ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (1.6ms) select table_name from information_schema.views where table_schema = 'adh_test'  (170.0ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:32:56 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:32:56 UTC +00:00]]  (107.9ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.6ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:32:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:32:56 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (2.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:32:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:32:56 UTC +00:00]]  (8.6ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:32:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:32:56 UTC +00:00]]  (2.8ms) COMMIT Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:32:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:32:56 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:32:56 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:32:56 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (1.5ms) BEGIN SQL (2.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:32:56 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:32:56 UTC +00:00]]  (2.7ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-05-09 15:32:56 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (6.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (1.1ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (1.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (21.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 46ms (Views: 23.7ms | ActiveRecord: 11.7ms) Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2015-05-09 15:32:57 +0200 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (73.7ms) COMMIT Redirected to http://127.0.0.1:43370/adherent/members/1/adhesions Completed 302 Found in 86ms (ActiveRecord: 77.8ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-05-09 15:32:57 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (8.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:43370/adherent/members/1/adhesions/new Completed 302 Found in 34ms (ActiveRecord: 19.3ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2015-05-09 15:32:57 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (55.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (57.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 70ms (Views: 62.1ms | ActiveRecord: 3.0ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-05-09 15:32:58 +0200  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions"  (9.5ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (229.7ms) TRUNCATE TABLE "adherent_members", "adherent_adhesions", "adherent_coords", "organisms", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (0.8ms) ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL SQL (0.9ms) DELETE FROM "adherent_members" Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) BEGIN SQL (6.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:42:36 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:42:36 UTC +00:00]]  (2.7ms) COMMIT Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:42:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:42:36 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:42:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:42:36 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:42:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:42:36 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:42:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:42:36 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:42:36 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:42:36 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) BEGIN Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:42:36 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Sat, 09 May 2015 13:42:36 UTC +00:00]] Adherent::Adhesion Load (2.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (1.7ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-05-09 15:42:41 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 1]] Adherent::Reglement Load (1.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (1.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (11.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/show.html.haml within layouts/adherent/application (53.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (29.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.5ms) Completed 200 OK in 139ms (Views: 95.0ms | ActiveRecord: 31.0ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-05-09 15:42:41 +0200 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-05-09 15:42:42 +0200 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-05-09 15:42:42 +0200 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-05-09 15:42:42 +0200 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-05-09 15:42:42 +0200 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-05-09 15:42:42 +0200 Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-05-09 15:42:42 +0200 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-05-09 15:42:42 +0200 Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-05-09 15:42:43 +0200 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN Adherent::Reglement Load (2.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] SQL (0.7ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (135.3ms) COMMIT Redirected to http://127.0.0.1:55625/adherent/members/1/payments Completed 302 Found in 174ms (ActiveRecord: 157.3ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2015-05-09 15:42:43 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Rendered collection (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (14.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 25ms (Views: 20.5ms | ActiveRecord: 2.1ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-05-09 15:42:43 +0200  (1.1ms) SELECT COUNT(*) FROM "adherent_payments"  (0.7ms) ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (2.5ms) select table_name from information_schema.views where table_schema = 'adh_test'  (180.7ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (1.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:42:44 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:42:44 UTC +00:00]]  (105.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:42:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:42:45 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:42:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:42:45 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:42:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:42:45 UTC +00:00]]  (1.9ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:42:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:42:45 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:42:45 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:42:45 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.3ms) BEGIN SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:42:45 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:42:45 UTC +00:00]]  (1.9ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-05-09 15:42:45 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (1.4ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (1.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/index.html.haml within layouts/adherent/application (26.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 48ms (Views: 28.4ms | ActiveRecord: 8.0ms) Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-05-09 15:42:45 +0200 Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2015-05-09 15:42:46 +0200 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (3.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN SQL (1.1ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (81.0ms) COMMIT Redirected to http://127.0.0.1:55625/adherent/members/1/adhesions Completed 302 Found in 110ms (ActiveRecord: 89.2ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-05-09 15:42:46 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (1.2ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:55625/adherent/members/1/adhesions/new Completed 302 Found in 14ms (ActiveRecord: 2.6ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2015-05-09 15:42:46 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (1.0ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (56.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/new.html.erb within layouts/adherent/application (59.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.3ms) Completed 200 OK in 75ms (Views: 65.7ms | ActiveRecord: 3.7ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-05-09 15:42:46 +0200  (0.9ms) SELECT COUNT(*) FROM "adherent_adhesions"  (0.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (2.5ms) select table_name from information_schema.views where table_schema = 'adh_test'  (215.6ms) TRUNCATE TABLE "adherent_adhesions", "adherent_coords", "adherent_members", "adherent_reglements", "organisms", "adherent_payments" RESTART IDENTITY CASCADE;  (0.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:42:47 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:42:47 UTC +00:00]]  (98.7ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:42:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:42:48 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:42:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:42:48 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:42:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:42:48 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:42:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:42:48 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:42:48 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:42:48 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:42:48 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (23.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 80ms (Views: 28.9ms | ActiveRecord: 4.1ms) Started GET "/assets/adherent/icones/csv.png" for 127.0.0.1 at 2015-05-09 15:42:48 +0200 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-05-09 15:42:48 +0200 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-05-09 15:42:48 +0200 Started GET "/assets/adherent/icones/xls.png" for 127.0.0.1 at 2015-05-09 15:42:48 +0200 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-05-09 15:42:48 +0200 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-05-09 15:42:48 +0200 Started GET "/assets/back_disabled.png" for 127.0.0.1 at 2015-05-09 15:42:48 +0200 Started GET "/assets/forward_disabled.png" for 127.0.0.1 at 2015-05-09 15:42:48 +0200 Started DELETE "/adherent/members/1" for 127.0.0.1 at 2015-05-09 15:42:49 +0200 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (2.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (2.3ms) BEGIN Adherent::Coord Load (1.2ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] SQL (0.7ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 1]]  (145.8ms) COMMIT Redirected to http://127.0.0.1:55625/adherent/members Completed 302 Found in 174ms (ActiveRecord: 156.0ms) Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:42:49 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (1.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (3.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/index.html.erb within layouts/adherent/application (13.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 16.5ms | ActiveRecord: 11.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members"  (0.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (1.7ms) select table_name from information_schema.views where table_schema = 'adh_test'  (171.8ms) TRUNCATE TABLE "adherent_coords", "adherent_members", "adherent_adhesions", "organisms", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (1.7ms) DELETE FROM "adherent_members" Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (5.4ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:03 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:03 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:03 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/1/payments/new" for 127.0.0.1 at 2015-05-09 15:43:03 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Adhesion Load (2.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (45.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (54.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (1.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (29.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.4ms) Completed 200 OK in 145ms (Views: 100.6ms | ActiveRecord: 11.7ms) Started POST "/adherent/members/1/payments" for 127.0.0.1 at 2015-05-09 15:43:04 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]]  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (1.5ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 1], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] SQL (2.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 1], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/1/payments Completed 302 Found in 43ms (ActiveRecord: 8.4ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2015-05-09 15:43:04 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Adhesion Load (1.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (23.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (32.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39ms (Views: 28.1ms | ActiveRecord: 8.2ms) Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 1]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 2]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 2]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 2], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 3]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 3]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 3], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/1/reglements/new" for 127.0.0.1 at 2015-05-09 15:43:04 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 2]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 3]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (21.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (26.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39ms (Views: 26.1ms | ActiveRecord: 7.4ms)  (0.9ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 2], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 2], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 2) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 2], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 4]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 4], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/4/payments/new" for 127.0.0.1 at 2015-05-09 15:43:04 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"4"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 2]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (37.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 54ms (Views: 40.7ms | ActiveRecord: 3.8ms) Started POST "/adherent/members/4/payments" for 127.0.0.1 at 2015-05-09 15:43:04 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"4"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 4]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 2]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 4], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 4]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 4], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["payment_id", 2], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/4/payments Completed 302 Found in 26ms (ActiveRecord: 7.6ms) Started GET "/adherent/members/4/payments" for 127.0.0.1 at 2015-05-09 15:43:04 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 4]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 4]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 4]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (17.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 15.7ms | ActiveRecord: 5.3ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 4]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 5]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 5], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 6]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 6]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 6], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/2/reglements/new" for 127.0.0.1 at 2015-05-09 15:43:04 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"2"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 4]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 6]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 6]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 5]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (19.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (23.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 37ms (Views: 22.6ms | ActiveRecord: 6.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 3], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 3], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 3) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 3) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 3], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 7]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 7]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 7], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/7/payments/new" for 127.0.0.1 at 2015-05-09 15:43:04 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"7"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "7"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 3]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (15.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (18.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 20.6ms | ActiveRecord: 3.2ms) Started POST "/adherent/members/7/payments" for 127.0.0.1 at 2015-05-09 15:43:04 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"7"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "7"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 3]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 7], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 7]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 7], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["payment_id", 3], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/7/payments Completed 302 Found in 23ms (ActiveRecord: 6.6ms) Started GET "/adherent/members/7/payments" for 127.0.0.1 at 2015-05-09 15:43:04 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"7"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 7]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (20.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 19.6ms | ActiveRecord: 6.0ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 7]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 8]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 8]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 8], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 9]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 9]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 9], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/3/reglements/new" for 127.0.0.1 at 2015-05-09 15:43:04 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"3"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 8]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 9]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (16.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (20.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 19.8ms | ActiveRecord: 6.9ms) Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 7]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 4], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 4], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 4) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 4) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 4], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 10]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 10]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 10], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/10/payments/new" for 127.0.0.1 at 2015-05-09 15:43:04 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"10"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "10"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 4]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 10]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (14.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (16.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 18.8ms | ActiveRecord: 3.8ms) Started POST "/adherent/members/10/payments" for 127.0.0.1 at 2015-05-09 15:43:04 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"10"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "10"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 10]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 4]] SQL (1.5ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 10], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 10]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 10]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 10], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["payment_id", 4], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/10/payments Completed 302 Found in 27ms (ActiveRecord: 7.1ms) Started GET "/adherent/members/10/payments" for 127.0.0.1 at 2015-05-09 15:43:04 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"10"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 10]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 10]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 10]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (20.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 21.1ms | ActiveRecord: 5.6ms) Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 10]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 11]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 11], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 12]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 12]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:04 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 12], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:04 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/4/reglements/new" for 127.0.0.1 at 2015-05-09 15:43:04 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"4"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 10]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 11]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 12]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 12]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (20.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (23.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (1.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 40ms (Views: 23.8ms | ActiveRecord: 7.6ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 5], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 5], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 5) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 5) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 5], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 13]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 13]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 13], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/13/payments/new" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"13"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 5]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 13]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (20.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (21.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 37ms (Views: 24.5ms | ActiveRecord: 2.9ms) Started POST "/adherent/members/13/payments" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"13"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 5]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 13], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 13]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 13]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 13], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["payment_id", 5], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/13/payments Completed 302 Found in 27ms (ActiveRecord: 6.2ms) Started GET "/adherent/members/13/payments" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"13"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 13]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (19.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 17.8ms | ActiveRecord: 5.2ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 13]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 14]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 14]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 14], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 15]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 15]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 15], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/5/reglements/new" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"5"} Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 15]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (19.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (24.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 37ms (Views: 23.2ms | ActiveRecord: 6.5ms) Started POST "/adherent/payments/5/reglements" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"14"}, "commit"=>"Enregistrer", "payment_id"=>"5"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "14"]] Adherent::Reglement Load (1.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 14], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["payment_id", 5], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Redirected to http://www.example.com/adherent/members/13/payments Completed 302 Found in 21ms (ActiveRecord: 6.8ms) Started GET "/adherent/members/13/payments" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"13"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 13]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (21.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (26.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 24.5ms | ActiveRecord: 6.1ms) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 6], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 6], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 6) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 6], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 16]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 16]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 16], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/16/payments/new" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"16"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 6]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 16]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (17.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (18.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 20.5ms | ActiveRecord: 2.5ms) Started POST "/adherent/members/16/payments" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"16"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 6]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 16], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 16]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 16], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["payment_id", 6], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/16/payments Completed 302 Found in 23ms (ActiveRecord: 5.9ms) Started GET "/adherent/members/16/payments" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"16"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 16]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (19.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 19.2ms | ActiveRecord: 4.6ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 16]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 17]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 17]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 17], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 18]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 18]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 18], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/6/reglements/new" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"6"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "6"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 18]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (22.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (26.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39ms (Views: 26.4ms | ActiveRecord: 6.9ms) Started POST "/adherent/payments/6/reglements" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"17"}, "commit"=>"Enregistrer", "payment_id"=>"6"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "6"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "17"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 17]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 17], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["payment_id", 6], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Redirected to http://www.example.com/adherent/members/16/payments Completed 302 Found in 32ms (ActiveRecord: 5.3ms) Started GET "/adherent/members/16/payments" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"16"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "16"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 16]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Adherent::Reglement Load (0.3ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 16]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (20.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 18.0ms | ActiveRecord: 5.9ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 7], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 7], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 7) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 7], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 19]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 19]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 19], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/19/payments/new" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"19"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "19"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 19]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (16.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (17.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 19.4ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/19/payments" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"19"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "19"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 7]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 19], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 19]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 19], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/19/payments Completed 302 Found in 19ms (ActiveRecord: 5.6ms) Started GET "/adherent/members/19/payments" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"19"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "19"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 19]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (19.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (22.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 20.4ms | ActiveRecord: 5.8ms) Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 19]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 20]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 20]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 20], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 21]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 21]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 21], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/7/reglements/new" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"7"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 21]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (21.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (27.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 40ms (Views: 26.8ms | ActiveRecord: 6.7ms) Started POST "/adherent/payments/7/reglements" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"20"}, "commit"=>"Enregistrer", "payment_id"=>"7"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "20"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 20], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Redirected to http://www.example.com/adherent/members/19/payments Completed 302 Found in 15ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/19/payments" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"19"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "19"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 19]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Adherent::Adhesion Load (1.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 7]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (19.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (24.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 22.8ms | ActiveRecord: 7.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 8], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 8], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 8) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 8], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 22]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 22]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 22], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/22/payments/new" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"22"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "22"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 8]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 22]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 15.7ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/22/payments" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"22"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "22"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 8]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 22], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 22]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 22], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/22/payments Completed 302 Found in 25ms (ActiveRecord: 6.1ms) Started GET "/adherent/members/22/payments" for 127.0.0.1 at 2015-05-09 15:43:05 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"22"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "22"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 22]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (17.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (21.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 21.0ms | ActiveRecord: 5.0ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 22]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 23]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 23]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:05 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 23], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:05 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 24]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 24]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 24], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/8/reglements/new" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"8"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 24]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 24]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (20.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (24.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 22.4ms | ActiveRecord: 6.8ms) Started POST "/adherent/payments/8/reglements" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"23"}, "commit"=>"Enregistrer", "payment_id"=>"8"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "23"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 23], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]] Redirected to http://www.example.com/adherent/members/22/payments Completed 302 Found in 17ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/22/payments" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"22"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "22"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 22]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 8]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 22]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (16.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (20.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 18.0ms | ActiveRecord: 6.3ms) Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" DESC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 23]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 23]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 9], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 9], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 9) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 9], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 25]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 25]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 25], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/25/payments/new" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"25"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "25"]] Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 9]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 25]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (12.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 29ms (Views: 15.1ms | ActiveRecord: 4.3ms) Started POST "/adherent/members/25/payments" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"80", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"25"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "25"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 9]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 25], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 25]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 25]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 25], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/25/payments Completed 302 Found in 21ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/25/payments" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"25"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "25"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 25]] Adherent::Reglement Load (1.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (17.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (22.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 21.4ms | ActiveRecord: 5.9ms) Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 25]] Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" Adherent::Adhesion Load (1.1ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 26]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 26]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 26], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 27]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 27]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 27], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/payments/9/reglements/new" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"9"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 27]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 27]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (17.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/new.html.erb within layouts/adherent/application (21.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 19.9ms | ActiveRecord: 6.9ms) Started POST "/adherent/payments/9/reglements" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::ReglementsController#create as HTML Parameters: {"utf8"=>"✓", "reglement"=>{"adhesion_id"=>"26"}, "commit"=>"Enregistrer", "payment_id"=>"9"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", "26"]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 26]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 26], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]] Redirected to http://www.example.com/adherent/members/25/payments Completed 302 Found in 15ms (ActiveRecord: 4.9ms) Started GET "/adherent/members/25/payments" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"25"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "25"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 25]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 26]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 9]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (23.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (28.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 37ms (Views: 26.7ms | ActiveRecord: 6.7ms) Adherent::Reglement Load (0.8ms) SELECT "adherent_reglements".* FROM "adherent_reglements" ORDER BY "adherent_reglements"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 25]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 25]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 10], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 10], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 10) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 10], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 28]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 28]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 28], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/28/payments/new" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"28"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "28"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 10]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 28]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 15.2ms | ActiveRecord: 3.0ms) Started POST "/adherent/members/28/payments" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"28"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "28"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 28]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 10]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 28], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 28]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 28]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 28], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/28/payments Completed 302 Found in 21ms (ActiveRecord: 6.3ms) Started GET "/adherent/members/28/payments" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"28"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "28"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 28]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 28]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 28]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (17.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (20.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 19.3ms | ActiveRecord: 4.8ms) Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 ORDER BY "adherent_payments"."id" DESC LIMIT 1 [["member_id", 28]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 10]]  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 11], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 11], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 11) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 11], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 31]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 31]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 31], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/31/payments/new" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"31"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 11]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 31]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (22.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (23.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 25.4ms | ActiveRecord: 2.7ms) Started POST "/adherent/members/31/payments" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"66", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"31"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 31]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 11]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 31], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 31]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 29]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 29], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/31/payments Completed 302 Found in 20ms (ActiveRecord: 6.0ms) Started GET "/adherent/members/31/payments" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"31"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "31"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 31]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 29]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 11]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (17.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (20.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 19.5ms | ActiveRecord: 4.9ms)  (1.2ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 31]]  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 12], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 12], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 12) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 12], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 34]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 34]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 34], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (1.1ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 34]] Started GET "/adherent/members/34/payments/new" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"34"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "34"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 12]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 34]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (20.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (21.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 36ms (Views: 23.6ms | ActiveRecord: 3.4ms) Started POST "/adherent/members/34/payments" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"34"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "34"]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 12]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 34], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 34]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 30]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 30], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["payment_id", 12], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/34/payments Completed 302 Found in 22ms (ActiveRecord: 6.4ms) Started GET "/adherent/members/34/payments" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"34"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "34"]] Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 34]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 30]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 12]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (17.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 16.2ms | ActiveRecord: 5.1ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 34]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.5ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 13], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 13], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 13) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 13], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 37]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 37]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 37], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "adherent_reglements" Started GET "/adherent/members/37/payments/new" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"37"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "37"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 13]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 37]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (14.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 16.5ms | ActiveRecord: 3.1ms) Started POST "/adherent/members/37/payments" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"37"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "37"]]  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 13]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 37], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 37]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 31]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 31], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["payment_id", 13], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/37/payments Completed 302 Found in 20ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/37/payments" for 127.0.0.1 at 2015-05-09 15:43:06 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"37"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "37"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 37]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 31]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 13]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 37]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (13.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (16.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 17.6ms | ActiveRecord: 4.5ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.7ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:06 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 14], ["updated_at", Sat, 09 May 2015 13:43:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 14], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 14) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 14], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 40]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 40]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 40], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/40/payments/new" for 127.0.0.1 at 2015-05-09 15:43:07 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"40"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "40"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 14]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 40]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (14.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (15.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.3ms) Completed 200 OK in 30ms (Views: 18.3ms | ActiveRecord: 3.2ms) Started POST "/adherent/members/40/payments" for 127.0.0.1 at 2015-05-09 15:43:07 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"50", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"40"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "40"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 40]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 14]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 40], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 40]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 32]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 32], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["payment_id", 14], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/40/payments Completed 302 Found in 21ms (ActiveRecord: 5.5ms) Started GET "/adherent/members/40/payments" for 127.0.0.1 at 2015-05-09 15:43:07 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"40"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "40"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 40]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 40]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 14]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 40]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (15.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (19.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 17.5ms | ActiveRecord: 5.3ms)  (1.0ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 40]]  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (1.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 15], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 15], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 15) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 15], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 43]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 43]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 43], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/43/payments/new" for 127.0.0.1 at 2015-05-09 15:43:07 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"43"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "43"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 15]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 43]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (13.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (16.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 18.6ms | ActiveRecord: 3.2ms) Started POST "/adherent/members/43/payments" for 127.0.0.1 at 2015-05-09 15:43:07 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"43"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "43"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 43]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 15]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 43], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 43]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 33], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["payment_id", 15], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/43/payments Completed 302 Found in 20ms (ActiveRecord: 5.8ms) Started GET "/adherent/members/43/payments" for 127.0.0.1 at 2015-05-09 15:43:07 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"43"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "43"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 43]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 43]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 15]] CACHE (0.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 43]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (19.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (21.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 20.6ms | ActiveRecord: 5.2ms) Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 43]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 33]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 16], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 16], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 16) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 16], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 46]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 46]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 46], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/46/payments/new" for 127.0.0.1 at 2015-05-09 15:43:07 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"46"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "46"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 16]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 46]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (11.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/new.html.haml within layouts/adherent/application (12.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 27ms (Views: 15.0ms | ActiveRecord: 3.8ms) Started POST "/adherent/members/46/payments" for 127.0.0.1 at 2015-05-09 15:43:07 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"33", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"46"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "46"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 46]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 16]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 46], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 46]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 34]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 34], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["payment_id", 16], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/46/payments Completed 302 Found in 23ms (ActiveRecord: 6.0ms) Started GET "/adherent/members/46/payments" for 127.0.0.1 at 2015-05-09 15:43:07 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"46"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "46"]] Adherent::Payment Load (0.5ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 46]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 46]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 16]] CACHE (0.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 46]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (14.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/index.html.haml within layouts/adherent/application (18.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 26ms (Views: 18.9ms | ActiveRecord: 4.9ms)  (0.8ms) SELECT COUNT(*) AS count_all, adherent_adhesions.id AS adherent_adhesions_id FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 46]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.3ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 49]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 49 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 49], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.7ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 50]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 50 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 50], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (1.1ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (1.3ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 51]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 51 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 51], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 51 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 51], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 51], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.6ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.8ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 52]]  (0.7ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 52 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 52], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 52 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 52], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]] SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 52], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 53]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 53 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 53], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 53 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 53], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]] SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 53], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.4ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 54]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 54 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 54], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 54 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 54], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]] SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 54], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 55]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 55 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 55], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 55 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 55], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 55], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 55], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]] Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 55]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 55]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 43]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 43], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["payment_id", 17], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 55], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 55]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 55]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 43]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 43], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["payment_id", 18], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 44]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 44], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["payment_id", 18], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.5ms) DELETE FROM "adherent_members" SQL (0.5ms) DELETE FROM "adherent_coords"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 56]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 56 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 56], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 56 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 56], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 56], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 56], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 56]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 56]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 45], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["payment_id", 19], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 56], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 56]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 56]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 45]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 45], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["payment_id", 20], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 46]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 46], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["payment_id", 20], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.3ms) DELETE FROM "adherent_members" SQL (0.2ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 57]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 57 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 57], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 57 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 57], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 57], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 57], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 57]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 57]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 47]] SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 47], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["payment_id", 21], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.8ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1; SQL (0.6ms) DELETE FROM "adherent_reglements" SQL (0.8ms) DELETE FROM "adherent_adhesions" SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 58]]  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 58 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_coords" ("created_at", "mail", "member_id", "tel", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["mail", "bonjour@example.com"], ["member_id", 58], ["tel", "01.02.03.04.05"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."id" != 58 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["from_date", Thu, 01 Jan 2015], ["member_id", 58], ["to_date", Sat, 31 Jan 2015], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]] SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["from_date", Sun, 01 Feb 2015], ["member_id", 58], ["to_date", Sat, 28 Feb 2015], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 58], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 58]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 58]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 49]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 49], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["payment_id", 22], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 58], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 58]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 58]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 49]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 49], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["payment_id", 23], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 50]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 50], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["payment_id", 23], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 58], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]] Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 58]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 58]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 50]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 50], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["payment_id", 24], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 1;  SQL (0.5ms) DELETE FROM "adherent_reglements" SQL (0.4ms) DELETE FROM "adherent_adhesions" SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members" SQL (0.4ms) DELETE FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.8ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.5ms) COMMIT  (0.2ms) BEGIN  (1.1ms) ROLLBACK  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:07 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:07 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 17) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 17], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/59/coord/new" for 127.0.0.1 at 2015-05-09 15:43:08 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"59"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "59"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 59]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (40.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (2.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (3.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (1.6ms) Completed 200 OK in 65ms (Views: 60.0ms | ActiveRecord: 1.5ms) Started POST "/adherent/members/59/coord" for 127.0.0.1 at 2015-05-09 15:43:08 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>""}, "commit"=>"Enregistrer", "member_id"=>"59"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "59"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 59]]  (0.5ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", ""], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 59], ["office", ""], ["tel", ""], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["zip", ""]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/59/adhesions/new Completed 302 Found in 15ms (ActiveRecord: 3.9ms) Started GET "/adherent/members/59/adhesions/new" for 127.0.0.1 at 2015-05-09 15:43:08 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"59"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "59"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 59]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 59]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (15.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 34ms (Views: 26.0ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 18) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 18], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/60/coord/new" for 127.0.0.1 at 2015-05-09 15:43:08 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"60"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.3ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "60"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 60]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (23.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 26.6ms | ActiveRecord: 1.6ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_coords" Started POST "/adherent/members/60/coord" for 127.0.0.1 at 2015-05-09 15:43:08 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"60"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "60"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 60]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 60], ["office", ""], ["tel", ""], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["zip", ""]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/60/adhesions/new Completed 302 Found in 13ms (ActiveRecord: 3.7ms) Started GET "/adherent/members/60/adhesions/new" for 127.0.0.1 at 2015-05-09 15:43:08 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"60"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "60"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 60]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 60]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 14.8ms | ActiveRecord: 2.2ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 19) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 19], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/61/coord/new" for 127.0.0.1 at 2015-05-09 15:43:08 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"61"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "61"]] Adherent::Coord Load (0.4ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 61]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (25.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 34ms (Views: 29.1ms | ActiveRecord: 1.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN SQL (0.3ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 20) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 20], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/62/coord/new" for 127.0.0.1 at 2015-05-09 15:43:08 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"62"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "62"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 62]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (22.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 25.8ms | ActiveRecord: 2.1ms) Started POST "/adherent/members/62/coord" for 127.0.0.1 at 2015-05-09 15:43:08 +0200 Processing by Adherent::CoordsController#create as HTML Parameters: {"utf8"=>"✓", "coord"=>{"mail"=>"joe.dalton@penitencier.us", "tel"=>"", "gsm"=>"", "office"=>"", "address"=>"", "zip"=>"", "city"=>"Oklahoma city"}, "commit"=>"Enregistrer", "member_id"=>"62"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "62"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 62]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_coords" ("address", "city", "created_at", "gsm", "mail", "member_id", "office", "tel", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["address", ""], ["city", "Oklahoma city"], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["gsm", ""], ["mail", "joe.dalton@penitencier.us"], ["member_id", 62], ["office", ""], ["tel", ""], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["zip", ""]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/62/adhesions/new Completed 302 Found in 10ms (ActiveRecord: 3.1ms) Started GET "/adherent/members/62/adhesions/new" for 127.0.0.1 at 2015-05-09 15:43:08 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"62"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "62"]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 62]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 62]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 16.4ms | ActiveRecord: 2.0ms) Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 62]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 63], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 63]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 63]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 63], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT COUNT(*) FROM "adherent_payments"  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 63]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 21]]  (0.4ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_payments"  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 64], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 64]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 64]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 64], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 64]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 64], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]] Adherent::Adhesion Load (0.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 64]]  (0.8ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 53]] SQL (0.9ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 53], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["payment_id", 25], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 65], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 65]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 65]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 65], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 65]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 23]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 65], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 65]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 55]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 55], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["payment_id", 26], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.3ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 56]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 56], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["payment_id", 26], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_reglements"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 66], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 66]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 66]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 66], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 66]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 24]]  (0.6ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 67], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 67]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 67]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["from_date", Wed, 10 Jun 2015], ["member_id", 67], ["to_date", Thu, 09 Jun 2016], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 67]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 25]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 67], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]] Adherent::Adhesion Load (0.6ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 67]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 59]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 59], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["payment_id", 27], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 60]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 60], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["payment_id", 27], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 27]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.5ms) ROLLBACK SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (29.3ms) COMMIT Adherent::Member Exists (1.2ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1  (8.4ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 26], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (37.8ms) COMMIT Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 26], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (24.4ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 26], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (2.1ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 26], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 26) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 26) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:08 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 26], ["updated_at", Sat, 09 May 2015 13:43:08 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Load (1.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:43:13 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (1.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (4.2ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 26; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 62ms (Views: 40.9ms | ActiveRecord: 14.4ms) Started GET "/assets/adherent/application.css" for 127.0.0.1 at 2015-05-09 15:43:13 +0200 Started GET "/assets/adherent/application.js" for 127.0.0.1 at 2015-05-09 15:43:13 +0200 Started GET "/assets/adherent/icones/nouveau.png" for 127.0.0.1 at 2015-05-09 15:43:13 +0200 Started GET "/assets/adherent/icones/payment.png" for 127.0.0.1 at 2015-05-09 15:43:13 +0200 Started GET "/assets/adherent/icones/xls.png" for 127.0.0.1 at 2015-05-09 15:43:13 +0200 Started GET "/assets/adherent/icones/bandaid.png" for 127.0.0.1 at 2015-05-09 15:43:13 +0200 Started GET "/assets/adherent/icones/csv.png" for 127.0.0.1 at 2015-05-09 15:43:13 +0200 Started GET "/assets/adherent/icones/card-address.png" for 127.0.0.1 at 2015-05-09 15:43:13 +0200 Started GET "/assets/adherent/icones/modifier.png" for 127.0.0.1 at 2015-05-09 15:43:13 +0200 Started GET "/assets/adherent/icones/supprimer.png" for 127.0.0.1 at 2015-05-09 15:43:13 +0200 Started GET "/assets/sort_asc.png" for 127.0.0.1 at 2015-05-09 15:43:14 +0200 Started GET "/assets/sort_both.png" for 127.0.0.1 at 2015-05-09 15:43:14 +0200 Started GET "/assets/forward_disabled.png" for 127.0.0.1 at 2015-05-09 15:43:14 +0200 Started GET "/assets/back_disabled.png" for 127.0.0.1 at 2015-05-09 15:43:14 +0200 Started DELETE "/adherent/members/68" for 127.0.0.1 at 2015-05-09 15:43:15 +0200 Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"68"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "68"]]  (0.2ms) BEGIN Adherent::Coord Load (1.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 68]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 68]] SQL (1.7ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 68]]  (1.0ms) COMMIT Redirected to http://127.0.0.1:41075/adherent/members Completed 302 Found in 29ms (ActiveRecord: 15.5ms) Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:43:15 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.9ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 26;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 25.8ms | ActiveRecord: 2.9ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members"  (0.7ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL  (1.8ms) select table_name from information_schema.views where table_schema = 'adh_test'  (153.7ms) TRUNCATE TABLE "adherent_coords", "adherent_members", "adherent_adhesions", "adherent_payments", "adherent_reglements", "organisms" RESTART IDENTITY CASCADE;  (1.2ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL SQL (1.2ms) DELETE FROM "adherent_members" Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) BEGIN SQL (2.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:16 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:16 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.1ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:16 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:16 UTC +00:00]]  (1.6ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:16 UTC +00:00]]  (1.5ms) COMMIT Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (2.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:16 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (1.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:16 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:16 UTC +00:00]]  (1.8ms) COMMIT Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (1.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]]  (0.4ms) BEGIN SQL (1.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:16 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:16 UTC +00:00]]  (1.2ms) COMMIT Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-05-09 15:43:16 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (1.1ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (1.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 39ms (Views: 25.0ms | ActiveRecord: 8.1ms) Started GET "/assets/adherent/icones/users.png" for 127.0.0.1 at 2015-05-09 15:43:17 +0200 Started DELETE "/adherent/members/1/adhesions/1" for 127.0.0.1 at 2015-05-09 15:43:18 +0200 Processing by Adherent::AdhesionsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_adhesions" WHERE "adherent_adhesions"."id" = $1 [["id", 1]]  (87.1ms) COMMIT Redirected to http://127.0.0.1:41075/adherent/members/1/adhesions Completed 302 Found in 119ms (ActiveRecord: 91.7ms) Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-05-09 15:43:18 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Redirected to http://127.0.0.1:41075/adherent/members/1/adhesions/new Completed 302 Found in 7ms (ActiveRecord: 1.7ms) Started GET "/adherent/members/1/adhesions/new" for 127.0.0.1 at 2015-05-09 15:43:18 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (22.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.8ms) Completed 200 OK in 42ms (Views: 28.6ms | ActiveRecord: 5.6ms) Started GET "/assets/cal.gif" for 127.0.0.1 at 2015-05-09 15:43:18 +0200  (1.1ms) SELECT COUNT(*) FROM "adherent_adhesions"  (0.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL  (1.8ms) select table_name from information_schema.views where table_schema = 'adh_test'  (150.6ms) TRUNCATE TABLE "adherent_members", "adherent_adhesions", "adherent_coords", "adherent_reglements", "organisms", "adherent_payments" RESTART IDENTITY CASCADE;  (1.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) BEGIN SQL (1.5ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:19 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:19 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:19 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (2.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:19 UTC +00:00]]  (1.2ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:19 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:19 UTC +00:00]]  (1.3ms) COMMIT Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:19 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:19 UTC +00:00]]  (1.4ms) COMMIT Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) BEGIN Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 1]] SQL (2.5ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:19 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 1], ["mode", "Chèque"], ["updated_at", Sat, 09 May 2015 13:43:19 UTC +00:00]] Adherent::Adhesion Load (2.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 1]]  (1.3ms) COMMIT Started GET "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-05-09 15:43:19 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (0.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 1]] Adherent::Reglement Load (0.9ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 1]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (12.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 57ms (Views: 39.4ms | ActiveRecord: 12.0ms) Started GET "/assets/adherent/icones/money-plus.png" for 127.0.0.1 at 2015-05-09 15:43:19 +0200 Started GET "/assets/adherent/icones/printer.png" for 127.0.0.1 at 2015-05-09 15:43:19 +0200 Started GET "/assets/adherent/icones/imputation.png" for 127.0.0.1 at 2015-05-09 15:43:19 +0200 Started DELETE "/adherent/members/1/payments/1" for 127.0.0.1 at 2015-05-09 15:43:20 +0200 Processing by Adherent::PaymentsController#destroy as HTML Parameters: {"member_id"=>"1", "id"=>"1"} Organism Load (2.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (2.9ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = $2 LIMIT 1 [["member_id", 1], ["id", "1"]]  (0.2ms) BEGIN Adherent::Reglement Load (4.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] SQL (1.0ms) DELETE FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 [["id", 1]]  (160.5ms) COMMIT Redirected to http://127.0.0.1:41075/adherent/members/1/payments Completed 302 Found in 189ms (ActiveRecord: 172.6ms) Started GET "/adherent/members/1/payments" for 127.0.0.1 at 2015-05-09 15:43:21 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Payment Load (1.4ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 1]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 56ms (Views: 12.0ms | ActiveRecord: 4.8ms)  (2.0ms) SELECT COUNT(*) FROM "adherent_payments"  (0.7ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "adherent_members" DISABLE TRIGGER ALL;ALTER TABLE "adherent_adhesions" DISABLE TRIGGER ALL;ALTER TABLE "adherent_coords" DISABLE TRIGGER ALL;ALTER TABLE "organisms" DISABLE TRIGGER ALL;ALTER TABLE "adherent_payments" DISABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" DISABLE TRIGGER ALL  (2.1ms) select table_name from information_schema.views where table_schema = 'adh_test'  (155.6ms) TRUNCATE TABLE "adherent_members", "adherent_adhesions", "adherent_coords", "organisms", "adherent_payments", "adherent_reglements" RESTART IDENTITY CASCADE;  (0.7ms) ALTER TABLE "adherent_adhesions" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "adherent_coords" ENABLE TRIGGER ALL;ALTER TABLE "adherent_members" ENABLE TRIGGER ALL;ALTER TABLE "adherent_payments" ENABLE TRIGGER ALL;ALTER TABLE "adherent_reglements" ENABLE TRIGGER ALL;ALTER TABLE "organisms" ENABLE TRIGGER ALL  (0.2ms) BEGIN Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6973636 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"#[RSpec::Mocks::Double:0x6972646 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 1.4ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x690e8ee @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 3.3ms | ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x689d932 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.8ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6853a9e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 2.1ms | ActiveRecord: 2.9ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x67f1ca4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x67f1ca4%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 8ms (ActiveRecord: 2.5ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x6793cb2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6793cb2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 7ms (ActiveRecord: 2.0ms)  (0.3ms) ROLLBACK  (0.6ms) BEGIN Processing by Adherent::PaymentsController#create as HTML Parameters: {"payment"=>{"amount"=>"57", "mode"=>"CB", "date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x672c2c4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.3ms | ActiveRecord: 2.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x66d4556 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.7ms | ActiveRecord: 2.5ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x66883c2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x66883c2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 6ms (ActiveRecord: 2.1ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x65ad600 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x65ad600%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#update as HTML Parameters: {"adhesion"=>{"amount"=>"125"}, "member_id"=>"#[RSpec::Mocks::Double:0x65689e2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.3ms | ActiveRecord: 2.0ms)  (0.7ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6514482 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.3ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64c1fca @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.3ms | ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6478c30 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6478c30%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6425a12 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 1.7ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"09/05/2016", "from_date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x63fa9a2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x63fa9a2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 7ms (ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"09/05/2016", "from_date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x63942e2 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x63942e2%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions Completed 302 Found in 9ms (ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#create as HTML Parameters: {"adhesion"=>{"amount"=>"57", "to_date"=>"09/05/2016", "from_date"=>"09/05/2015"}, "member_id"=>"#[RSpec::Mocks::Double:0x63306e8 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 2.1ms | ActiveRecord: 1.9ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x629e112 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.4ms | ActiveRecord: 1.9ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6241318 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]", "id"=>"1"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.4ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 21) LIMIT 1 SQL (1.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 21], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (1.1ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/1/adhesions" for 127.0.0.1 at 2015-05-09 15:43:22 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"1"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "1"]] Adherent::Adhesion Exists (0.9ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 1]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 1]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 20ms (Views: 11.8ms | ActiveRecord: 4.4ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.5ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 22) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 22], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 2], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/2/adhesions" for 127.0.0.1 at 2015-05-09 15:43:22 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"2"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Adherent::Adhesion Exists (1.0ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 2]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 2]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 9.8ms | ActiveRecord: 4.2ms) Started GET "/adherent/members/2/payments/new" for 127.0.0.1 at 2015-05-09 15:43:22 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"2"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "2"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 22]] Adherent::Adhesion Load (1.5ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 2]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (26.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 49ms (Views: 35.3ms | ActiveRecord: 4.1ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN SQL (0.7ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 23) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 23], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.9ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 3], ["to_date", Tue, 09 Jun 2015], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/3/adhesions" for 127.0.0.1 at 2015-05-09 15:43:22 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"3"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (1.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Adhesion Exists (1.0ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 3]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 3]]  (1.2ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.3ms) Completed 200 OK in 27ms (Views: 13.9ms | ActiveRecord: 6.2ms) Started GET "/adherent/members/3/adhesions/3/edit" for 127.0.0.1 at 2015-05-09 15:43:22 +0200 Processing by Adherent::AdhesionsController#edit as HTML Parameters: {"member_id"=>"3", "id"=>"3"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "3"]] Adherent::Adhesion Load (1.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 AND "adherent_adhesions"."id" = $2 LIMIT 1 [["member_id", 3], ["id", "3"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (12.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.4ms) Completed 200 OK in 28ms (Views: 20.6ms | ActiveRecord: 3.1ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.5ms) ROLLBACK  (0.3ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 24) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 24], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/4/adhesions/new" for 127.0.0.1 at 2015-05-09 15:43:22 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"4"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (13.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 16.6ms | ActiveRecord: 2.6ms)  (1.1ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]] Started POST "/adherent/members/4/adhesions" for 127.0.0.1 at 2015-05-09 15:43:22 +0200 Processing by Adherent::AdhesionsController#create as HTML Parameters: {"utf8"=>"✓", "adhesion"=>{"from_date"=>"01/08/2013", "to_date"=>"31/07/2014", "amount"=>"150.25"}, "commit"=>"Enregistrer", "member_id"=>"4"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 4], ["to_date", Thu, 31 Jul 2014], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/4/adhesions Completed 302 Found in 11ms (ActiveRecord: 3.1ms) Started GET "/adherent/members/4/adhesions" for 127.0.0.1 at 2015-05-09 15:43:22 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"4"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "4"]] Adherent::Adhesion Exists (0.8ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 4]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]]  (1.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] CACHE (0.1ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 4]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.5ms) Completed 200 OK in 22ms (Views: 15.2ms | ActiveRecord: 3.6ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 4]] SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 25) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:22 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 25], ["updated_at", Sat, 09 May 2015 13:43:22 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/5/adhesions/new" for 127.0.0.1 at 2015-05-09 15:43:22 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"5"} Organism Load (1.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 5]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 5]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (10.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 14.7ms | ActiveRecord: 3.1ms) SQL (0.6ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::AllpaymentsController#index as HTML Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 17ms (Views: 4.0ms | ActiveRecord: 2.0ms)  (0.8ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh1' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "Adh1"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at", "zip") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["city", "Lille"], ["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["member_id", 6], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["zip", 59000]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (1.1ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 6]]  (0.6ms) SELECT COUNT(*) FROM "adherent_coords"  (0.6ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "adherent_coords" WHERE "adherent_coords"."id" = $1 [["id", 1]] Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 6]] SQL (2.6ms) DELETE FROM "adherent_members" WHERE "adherent_members"."id" = $1 [["id", 6]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "adherent_coords"  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (2.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (1.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 27) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 27], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 7]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 7]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 7], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 27]] SQL (1.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 7], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]] Adherent::Adhesion Load (2.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 7]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/7/payments/1" for 127.0.0.1 at 2015-05-09 15:43:23 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"7", "id"=>"1"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "7"]] Adherent::Payment Load (0.7ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 1 LIMIT 1 [["member_id", 7]] Adherent::Reglement Load (1.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 7]] Adherent::Reglement Load (1.2ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 1]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (3.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 20.8ms | ActiveRecord: 6.3ms) SQL (0.5ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 28) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 28], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 8]] Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 8]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 8], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 28]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 8], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]] Adherent::Adhesion Load (0.7ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 8]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/8/payments/2" for 127.0.0.1 at 2015-05-09 15:43:23 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"8", "id"=>"2"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "8"]] Adherent::Payment Load (1.2ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 2 LIMIT 1 [["member_id", 8]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Member Load (1.2ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 8]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 2]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (2.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 30ms (Views: 16.4ms | ActiveRecord: 6.6ms) SQL (0.4ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.6ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (2.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 29) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 29], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (2.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 9]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 9]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 9], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 9]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 29]] SQL (1.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 9], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]] Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 9]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/9/payments/3" for 127.0.0.1 at 2015-05-09 15:43:23 +0200 Processing by Adherent::PaymentsController#show as HTML Parameters: {"member_id"=>"9", "id"=>"3"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "9"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 AND "adherent_payments"."id" = 3 LIMIT 1 [["member_id", 9]] Adherent::Reglement Load (1.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 9]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 3]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_receipt.html.haml (3.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 33ms (Views: 22.2ms | ActiveRecord: 7.3ms) SQL (0.6ms) DELETE FROM "adherent_payments" SQL (0.4ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 30) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 30], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 10]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 10]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 10], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 10]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 30]] SQL (1.4ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 10], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]] Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 10]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/10/payments" for 127.0.0.1 at 2015-05-09 15:43:23 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"10"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "10"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 10]] Adherent::Reglement Load (1.1ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (1.0ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]]  (0.9ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Reglement Load (0.6ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 4]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 10]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (19.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 21.8ms | ActiveRecord: 6.1ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 31) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 31], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 11]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 11]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 11], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 31]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 11], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]] Adherent::Adhesion Load (1.3ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 11]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/11/payments" for 127.0.0.1 at 2015-05-09 15:43:23 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"11"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "11"]] Adherent::Payment Load (1.0ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 11]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Member Load (3.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (12.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 13.5ms | ActiveRecord: 7.7ms) Started GET "/adherent/payments/5/reglements/new" for 127.0.0.1 at 2015-05-09 15:43:23 +0200 Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"5"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Payment Load (0.6ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."id" = $1 LIMIT 1 [["id", "5"]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 11]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Reglement Load (0.5ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 5]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Rendered /home/jcl/rails_project/Adherent/app/views/adherent/reglements/_form.html.haml (13.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 21.7ms | ActiveRecord: 4.9ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 32) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 32], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 12]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 12]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 12], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/12/payments/new" for 127.0.0.1 at 2015-05-09 15:43:23 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"12"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "12"]] Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 32]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 12]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (13.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 31ms (Views: 18.7ms | ActiveRecord: 2.9ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 12]] Started POST "/adherent/members/12/payments" for 127.0.0.1 at 2015-05-09 15:43:23 +0200 Processing by Adherent::PaymentsController#create as HTML Parameters: {"utf8"=>"✓", "payment"=>{"date"=>"09/05/2015", "comment"=>"", "amount"=>"150.25", "mode"=>"CB"}, "commit"=>"Enregistrer", "member_id"=>"12"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "12"]]  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 12]] Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 32]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "comment", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["amount", #], ["comment", ""], ["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 12], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 12]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/12/payments Completed 302 Found in 19ms (ActiveRecord: 4.5ms) Started GET "/adherent/members/12/payments" for 127.0.0.1 at 2015-05-09 15:43:23 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"12"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "12"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 12]] Adherent::Reglement Load (0.7ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]]  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Reglement Load (0.4ms) SELECT "adherent_reglements".* FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."payment_id" = $1 [["payment_id", 6]] Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 12]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_payment.html.haml (10.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 14.5ms | ActiveRecord: 4.7ms)  (0.7ms) SELECT COUNT(*) FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 12]] SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 33) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 33], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 13]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 13]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 13], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/13/payments/new" for 127.0.0.1 at 2015-05-09 15:43:23 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"13"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "13"]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 33]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 13]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (15.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 35ms (Views: 22.2ms | ActiveRecord: 3.1ms) SQL (0.7ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.4ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 34) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 34], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.7ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 14]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 14]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 14], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/14/payments/new" for 127.0.0.1 at 2015-05-09 15:43:23 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"14"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "14"]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 34]] Adherent::Adhesion Load (1.4ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 14]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (12.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 15.6ms | ActiveRecord: 3.3ms) SQL (0.4ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.5ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 35) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 35], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 15]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 15]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 15], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/15/payments/new" for 127.0.0.1 at 2015-05-09 15:43:23 +0200 Processing by Adherent::PaymentsController#new as HTML Parameters: {"member_id"=>"15"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.4ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "15"]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 35]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 15]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/payments/_form.html.haml (18.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 22.4ms | ActiveRecord: 2.5ms) SQL (0.8ms) DELETE FROM "adherent_members"  (0.2ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::ReglementsController#create as HTML Parameters: {"reglement"=>{"adhesion_id"=>"9"}, "payment_id"=>"#[RSpec::Mocks::Double:0x6494dcc @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6494e08%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/payments Completed 302 Found in 8ms (ActiveRecord: 1.7ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x6464bc2 @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.7ms | ActiveRecord: 2.3ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::ReglementsController#new as HTML Parameters: {"payment_id"=>"#[RSpec::Mocks::Double:0x642f81e @name=Adherent::Payment(id: integer, date: date, amount: decimal, mode: string, member_id: integer, created_at: datetime, updated_at: datetime, comment: string)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.6ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:23 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:23 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.8ms | ActiveRecord: 2.4ms)  (0.7ms) ROLLBACK  (0.4ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 14], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 14]]  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 15], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 15]]  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 1], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 16]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 16], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["payment_id", 1], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.7ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN  (0.7ms) ROLLBACK  (0.4ms) BEGIN  (0.7ms) COMMIT  (0.2ms) BEGIN  (0.6ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN  (0.5ms) ROLLBACK  (0.5ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.7ms) BEGIN  (0.4ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 39], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 39) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 39) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 39], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 16], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 17], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 17]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 39]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 17], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]] Adherent::Adhesion Load (0.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 17]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 18]] SQL (0.7ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 18], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["payment_id", 7], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.8ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" DESC LIMIT 1 SQL (0.5ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 40], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 40) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 40) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 40], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (1.0ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 18], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 19], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 19]] Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 40]] SQL (1.0ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 19], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]] Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 19]]  (0.6ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 20]] SQL (1.1ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 20], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["payment_id", 8], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 18]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 40]] SQL (0.7ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 18], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 18]]  (0.7ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 19]] SQL (0.8ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 19], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["payment_id", 9], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 Adherent::Adhesion Load (1.0ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."id" ASC LIMIT 1 SQL (0.6ms) DELETE FROM "adherent_members"  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 41], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 41) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 41) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 41], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 20], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["from_date", Thu, 01 Aug 2013], ["member_id", 21], ["to_date", Sat, 31 Aug 2013], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 21]] Organism Load (0.5ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 41]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 21], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 21]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] SQL (1.2ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 22], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["payment_id", 10], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 21]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 41]] SQL (0.9ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 21], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]] Adherent::Adhesion Load (0.9ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 21]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 22]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 22], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["payment_id", 11], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", 20]] Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."id" = $1 LIMIT 1 [["id", 41]] SQL (0.8ms) INSERT INTO "adherent_payments" ("amount", "created_at", "date", "member_id", "mode", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["date", Sat, 09 May 2015], ["member_id", 20], ["mode", "CB"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]] Adherent::Adhesion Load (1.1ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id WHERE "adherent_adhesions"."member_id" = $1 GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) ORDER BY "adherent_adhesions"."to_date" ASC [["member_id", 20]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 21]] SQL (0.6ms) INSERT INTO "adherent_reglements" ("adhesion_id", "amount", "created_at", "payment_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["adhesion_id", 21], ["amount", #], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["payment_id", 12], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.2ms) SELECT adherent_adhesions.*, sum(adherent_reglements.amount) as reglements_amount FROM "adherent_adhesions" left join adherent_reglements on adherent_adhesions.id = adherent_reglements.adhesion_id GROUP BY adherent_adhesions.id HAVING adherent_adhesions.amount > 0 AND (adherent_adhesions.amount > sum(adherent_reglements.amount) OR sum(adherent_reglements.amount) IS NULL) SQL (0.5ms) DELETE FROM "adherent_members"  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::MembersController#index as XLS Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.9ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 42;  Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 42; Sent data Mon association-09-mai-2015-Membres.csv (2.3ms) Completed 200 OK in 15ms (Views: 2.1ms | ActiveRecord: 6.6ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.6ms | ActiveRecord: 2.2ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (1.5ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 44;  Completed 200 OK in 8ms (Views: 1.4ms | ActiveRecord: 3.3ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#index as CSV Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::QueryMember Load (2.0ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 45; Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 45;  Sent data Mon association-09-mai-2015-Membres.csv (0.7ms) Completed 200 OK in 12ms (Views: 0.3ms | ActiveRecord: 6.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x5304594 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 7ms (ActiveRecord: 2.2ms)  (0.6ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::MembersController#destroy as HTML Parameters: {"id"=>"#[RSpec::Mocks::Double:0x52de16e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members Completed 302 Found in 6ms (ActiveRecord: 2.1ms)  (0.8ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"22"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/22 Completed 302 Found in 6ms (ActiveRecord: 1.9ms)  (0.6ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"23"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."id" != 23 AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.2ms) UPDATE "adherent_members" SET "name" = $1, "updated_at" = $2 WHERE "adherent_members"."id" = 23 [["name", "Dalton"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/23 Completed 302 Found in 17ms (ActiveRecord: 5.0ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"24"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/24 Completed 302 Found in 6ms (ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.3ms) BEGIN Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A002' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A002"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Adherent::MembersController#update as HTML Parameters: {"member"=>{"name"=>"Dalton"}, "id"=>"25"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.0ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"998"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.1ms | ActiveRecord: 1.8ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#show as HTML Parameters: {"id"=>"999"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 2.0ms | ActiveRecord: 3.1ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001", "birthdate"=>"06/06/1955"}} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 54) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Mon, 06 Jun 1955], ["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 54], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/26/coord/new Completed 302 Found in 13ms (ActiveRecord: 4.4ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 3.0ms | ActiveRecord: 2.3ms)  (0.7ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 56) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 56], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/27/coord/new Completed 302 Found in 15ms (ActiveRecord: 4.5ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#create as HTML Parameters: {"member"=>{"name"=>"Dupont", "forname"=>"Jules", "number"=>"A001"}} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (2.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'A001' AND "adherent_members"."organism_id" = 57) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "A001"], ["organism_id", 57], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/28/coord/new Completed 302 Found in 16ms (ActiveRecord: 6.3ms)  (0.5ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"998"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 2.0ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"999"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.5ms | ActiveRecord: 2.5ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::MembersController#new as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.8ms | ActiveRecord: 2.1ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 61], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 61], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (1.4ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 61], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 61], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 61) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 61) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 61], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:43:24 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.5ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 61;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 21.9ms | ActiveRecord: 2.2ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 62], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 62], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 62], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 62], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 62) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 62) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 62], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:43:24 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 62;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 18.3ms | ActiveRecord: 2.3ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 63], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 63], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 63], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 63], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 63) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:24 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 63], ["updated_at", Sat, 09 May 2015 13:43:24 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/new" for 127.0.0.1 at 2015-05-09 15:43:24 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (16.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 22.1ms | ActiveRecord: 0.7ms)  (1.1ms) SELECT COUNT(*) FROM "adherent_members" Started POST "/adherent/members" for 127.0.0.1 at 2015-05-09 15:43:25 +0200 Processing by Adherent::MembersController#create as HTML Parameters: {"utf8"=>"✓", "member"=>{"number"=>"ADH1", "name"=>"James", "forname"=>"Jessie", "birthdate"=>""}, "commit"=>"Créer le membre"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'ADH1' AND "adherent_members"."organism_id" = 63) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "Jessie"], ["name", "James"], ["number", "ADH1"], ["organism_id", 63], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://www.example.com/adherent/members/44/coord/new Completed 302 Found in 11ms (ActiveRecord: 2.7ms) Started GET "/adherent/members/44/coord/new" for 127.0.0.1 at 2015-05-09 15:43:25 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"44"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "44"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 44]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (21.8ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 32ms (Views: 26.1ms | ActiveRecord: 2.0ms)  (0.6ms) SELECT COUNT(*) FROM "adherent_members"  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (1.1ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 64], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 64], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 64], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 64], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 64) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 64) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 64], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:43:25 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.8ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 64; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 16.1ms | ActiveRecord: 2.7ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/45/coord" for 127.0.0.1 at 2015-05-09 15:43:25 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"45"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "45"]] Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 45]] Redirected to http://www.example.com/adherent/members/45/coord/new Completed 302 Found in 8ms (ActiveRecord: 2.4ms) Started GET "/adherent/members/45/coord/new" for 127.0.0.1 at 2015-05-09 15:43:25 +0200 Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"45"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "45"]] Adherent::Coord Load (0.5ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 45]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/coords/_form.html.erb (33.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.6ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 42ms (Views: 36.9ms | ActiveRecord: 1.6ms)  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 65], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 65], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 65], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 65], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 65) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 65) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 65], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:43:25 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.9ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 65;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 25ms (Views: 20.3ms | ActiveRecord: 2.6ms) Started GET "/adherent/members/new" for 127.0.0.1 at 2015-05-09 15:43:25 +0200 Processing by Adherent::MembersController#new as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (16.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 23ms (Views: 20.2ms | ActiveRecord: 0.8ms)  (0.5ms) ROLLBACK  (0.5ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.5ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 66], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 66], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 66], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (1.3ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 66], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 66) LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 66) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 66], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:43:25 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.3ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 66; Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 26ms (Views: 22.3ms | ActiveRecord: 1.9ms) Adherent::Member Load (0.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/55/edit" for 127.0.0.1 at 2015-05-09 15:43:25 +0200 Processing by Adherent::MembersController#edit as HTML Parameters: {"id"=>"55"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "55"]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/members/_form.html.erb (13.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 22ms (Views: 18.1ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.4ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 67], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 67], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 67], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 67], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 67) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 67) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 67], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:43:25 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (1.2ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (2.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 67;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 22ms (Views: 15.5ms | ActiveRecord: 3.5ms) Adherent::Member Load (0.9ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "adherent_coords" ("city", "created_at", "member_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["city", "Marseille"], ["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["member_id", 60], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Coord Load (0.7ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 60]] Started GET "/adherent/members/60/coord" for 127.0.0.1 at 2015-05-09 15:43:25 +0200 Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"60"} Organism Load (0.9ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "60"]] Adherent::Coord Load (0.6ms) SELECT "adherent_coords".* FROM "adherent_coords" WHERE "adherent_coords"."member_id" = $1 LIMIT 1 [["member_id", 60]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.4ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 9.7ms | ActiveRecord: 2.1ms)  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.5ms) SAVEPOINT active_record_1 Adherent::Member Exists (1.0ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 68], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 68], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 68], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 68], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 68) LIMIT 1  (0.6ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 68) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 68], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:43:25 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.5ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 68;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.9ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 21ms (Views: 16.9ms | ActiveRecord: 2.3ms) Adherent::Member Load (1.3ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/65/payments" for 127.0.0.1 at 2015-05-09 15:43:25 +0200 Processing by Adherent::PaymentsController#index as HTML Parameters: {"member_id"=>"65"} Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "65"]] Adherent::Payment Load (0.8ms) SELECT "adherent_payments".* FROM "adherent_payments" WHERE "adherent_payments"."member_id" = $1 [["member_id", 65]] Rendered collection (0.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 18ms (Views: 13.4ms | ActiveRecord: 2.2ms)  (0.7ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (1.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 69], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 69], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.4ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 69], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 69], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 69) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 69) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 69], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:43:25 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.4ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 69;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.2ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 28ms (Views: 23.2ms | ActiveRecord: 2.1ms) Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 70]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 70]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 70], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members/70/adhesions" for 127.0.0.1 at 2015-05-09 15:43:25 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"70"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.7ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "70"]] Adherent::Adhesion Exists (0.6ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 70]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 70]]  (0.5ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] CACHE (0.0ms) SELECT SUM("adherent_reglements"."amount") AS sum_id FROM "adherent_reglements" WHERE "adherent_reglements"."adhesion_id" = $1 [["adhesion_id", 23]] Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 16ms (Views: 9.1ms | ActiveRecord: 3.1ms)  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.4ms) COMMIT  (0.3ms) BEGIN SQL (0.5ms) DELETE FROM "adherent_members" Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.4ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh000' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_0"], ["number", "Adh000"], ["organism_id", 70], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh001' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (1.2ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_1"], ["number", "Adh001"], ["organism_id", 70], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh002' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_2"], ["number", "Adh002"], ["organism_id", 70], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh003' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.5ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_3"], ["number", "Adh003"], ["organism_id", 70], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 70) LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh004' AND "adherent_members"."organism_id" = 70) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "le prénom"], ["name", "Nom_4"], ["number", "Adh004"], ["organism_id", 70], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (1.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/adherent/members" for 127.0.0.1 at 2015-05-09 15:43:25 +0200 Processing by Adherent::MembersController#index as HTML Organism Load (0.8ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::QueryMember Load (1.5ms) SELECT adherent_members.id, organism_id, number, name, forname, birthdate, adherent_coords.mail AS mail, adherent_coords.tel AS tel, (SELECT to_date FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id ORDER BY to_date DESC LIMIT 1 ) AS m_to_date, (SELECT SUM(adherent_reglements.amount) FROM adherent_reglements, adherent_adhesions WHERE adherent_reglements.adhesion_id = adherent_adhesions.id AND adherent_adhesions.member_id = adherent_members.id) AS t_reglements, (SELECT SUM(amount) FROM adherent_adhesions WHERE adherent_adhesions.member_id = adherent_members.id) AS t_adhesions FROM adherent_members LEFT JOIN adherent_coords ON adherent_members.id = adherent_coords.member_id WHERE organism_id = 70;  Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.3ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.5ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.1ms) Completed 200 OK in 24ms (Views: 19.6ms | ActiveRecord: 2.3ms) Adherent::Member Load (1.8ms) SELECT "adherent_members".* FROM "adherent_members" ORDER BY "adherent_members"."id" ASC LIMIT 1 Started GET "/adherent/members/75/adhesions" for 127.0.0.1 at 2015-05-09 15:43:25 +0200 Processing by Adherent::AdhesionsController#index as HTML Parameters: {"member_id"=>"75"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.5ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "75"]] Adherent::Adhesion Exists (0.5ms) SELECT 1 AS one FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 LIMIT 1 [["member_id", 75]] Redirected to http://www.example.com/adherent/members/75/adhesions/new Completed 302 Found in 6ms (ActiveRecord: 1.7ms) Started GET "/adherent/members/75/adhesions/new" for 127.0.0.1 at 2015-05-09 15:43:25 +0200 Processing by Adherent::AdhesionsController#new as HTML Parameters: {"member_id"=>"75"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1 Adherent::Member Load (0.6ms) SELECT "adherent_members".* FROM "adherent_members" WHERE "adherent_members"."id" = $1 LIMIT 1 [["id", "75"]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 75]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 75]] Rendered /home/jcl/rails_project/Adherent/app/views/adherent/adhesions/_form.html.haml (11.0ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_header.html.haml (0.1ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_flash_partial.html.haml (0.7ms) Rendered /home/jcl/rails_project/Adherent/app/views/layouts/adherent/_footer.html.haml (0.2ms) Completed 200 OK in 24ms (Views: 15.0ms | ActiveRecord: 2.4ms)  (0.4ms) ROLLBACK  (0.5ms) BEGIN  (0.5ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.5ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.4ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.8ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 80]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 80]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 80], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 80]] Adherent::Adhesion Load (0.8ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 80]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.8ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (1.2ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 81]] Adherent::Adhesion Load (0.9ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 81]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 81], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.3ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 81]] Adherent::Adhesion Load (0.4ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 81]]  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.9ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 82]] Adherent::Adhesion Load (0.6ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 82]]  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "adherent_adhesions" ("amount", "created_at", "from_date", "member_id", "to_date", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["amount", #], ["created_at", Sat, 09 May 2015 13:43:25 UTC +00:00], ["from_date", Sat, 09 May 2015], ["member_id", 82], ["to_date", Sun, 08 May 2016], ["updated_at", Sat, 09 May 2015 13:43:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 [["member_id", 82]] Adherent::Adhesion Load (0.5ms) SELECT "adherent_adhesions".* FROM "adherent_adhesions" WHERE "adherent_adhesions"."member_id" = $1 ORDER BY to_date DESC LIMIT 1 [["member_id", 82]]  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN  (0.5ms) ROLLBACK  (0.4ms) BEGIN  (0.1ms) COMMIT  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.3ms) BEGIN  (0.3ms) ROLLBACK  (0.5ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) COMMIT  (0.7ms) BEGIN Adherent::Member Exists (1.1ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" IS NULL AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.5ms) ROLLBACK  (0.3ms) BEGIN  (0.1ms) COMMIT  (0.2ms) BEGIN Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN Adherent::Member Exists (1.3ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) COMMIT  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.6ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 2) LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) COMMIT  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "adherent_members" ("created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Adherent::Member Exists (0.5ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) COMMIT  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 Adherent::Member Exists (0.7ms) SELECT 1 AS one FROM "adherent_members" WHERE ("adherent_members"."number" = 'Adh 001' AND "adherent_members"."organism_id" = 1) LIMIT 1 SQL (1.5ms) INSERT INTO "adherent_members" ("birthdate", "created_at", "forname", "name", "number", "organism_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["birthdate", Tue, 06 Jun 1944], ["created_at", Sat, 09 May 2015 13:43:26 UTC +00:00], ["forname", "Jules"], ["name", "Dupont"], ["number", "Adh 001"], ["organism_id", 1], ["updated_at", Sat, 09 May 2015 13:43:26 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x659332c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.9ms | ActiveRecord: 1.9ms)  (0.7ms) ROLLBACK  (0.5ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x656fa3a @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x656fa3a%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 8ms (ActiveRecord: 2.7ms)  (0.8ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x6545406 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (3.1ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6545406%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/coord Completed 302 Found in 11ms (ActiveRecord: 4.5ms)  (0.5ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#update as HTML Parameters: {"coord"=>{"city"=>"Dallas"}, "member_id"=>"#[RSpec::Mocks::Double:0x651d76c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.3ms | ActiveRecord: 2.7ms)  (0.4ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#new as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64f99ca @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.3ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 2.8ms)  (0.2ms) ROLLBACK  (0.4ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64d6902 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 2.2ms)  (0.9ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#show as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x64a6356 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x6479a2c @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.6ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:26 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.2ms | ActiveRecord: 2.7ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN Processing by Adherent::CoordsController#create as HTML Parameters: {"coord"=>{"city"=>"Bruxelles", "zip"=>"1000"}, "member_id"=>"#[RSpec::Mocks::Double:0x6450668 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.4ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:26 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/adherent/members/%23%5BRSpec::Mocks::Double:0x6450668%20@name=Adherent::Member(id:%20integer,%20number:%20string,%20name:%20string,%20forname:%20string,%20birthdate:%20date,%20created_at:%20datetime,%20updated_at:%20datetime,%20organism_id:%20integer)%5D/adhesions/new Completed 302 Found in 9ms (ActiveRecord: 2.6ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x6421f3e @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (0.7ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:26 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.5ms | ActiveRecord: 1.8ms)  (0.7ms) ROLLBACK  (0.3ms) BEGIN Processing by Adherent::CoordsController#edit as HTML Parameters: {"member_id"=>"#[RSpec::Mocks::Double:0x640cef4 @name=Adherent::Member(id: integer, number: string, name: string, forname: string, birthdate: date, created_at: datetime, updated_at: datetime, organism_id: integer)]"} Organism Load (1.0ms) SELECT "organisms".* FROM "organisms" WHERE "organisms"."title" = 'Mon association' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "organisms" ("created_at", "title", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 09 May 2015 13:43:26 UTC +00:00], ["title", "Mon association"], ["updated_at", Sat, 09 May 2015 13:43:26 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.9ms | ActiveRecord: 2.3ms)  (0.4ms) ROLLBACK